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()
except (KeyboardInterrupt, IOError, OSError) as e:
logging.error(e)
import traceback
traceback.print_exc()
if config['verbose']:
import traceback
traceback.print_exc()
os._exit(1)
if __name__ == '__main__':

5
shadowsocks/server.py

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

Loading…
Cancel
Save