Browse Source

only output exception in verbose mode

auth
clowwindy 10 years ago
parent
commit
2a61e80071
  1. 5
      shadowsocks/local.py
  2. 5
      shadowsocks/server.py

5
shadowsocks/local.py

@ -68,8 +68,9 @@ def main():
loop.run() loop.run()
except (KeyboardInterrupt, IOError, OSError) as e: except (KeyboardInterrupt, IOError, OSError) as e:
logging.error(e) logging.error(e)
import traceback if config['verbose']:
traceback.print_exc() import traceback
traceback.print_exc()
os._exit(1) os._exit(1)
if __name__ == '__main__': if __name__ == '__main__':

5
shadowsocks/server.py

@ -79,8 +79,9 @@ def main():
loop.run() loop.run()
except (KeyboardInterrupt, IOError, OSError) as e: except (KeyboardInterrupt, IOError, OSError) as e:
logging.error(e) logging.error(e)
import traceback if config['verbose']:
traceback.print_exc() import traceback
traceback.print_exc()
os._exit(1) os._exit(1)
if int(config['workers']) > 1: if int(config['workers']) > 1:

Loading…
Cancel
Save