Browse Source

only output exception in verbose mode

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

1
shadowsocks/local.py

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

1
shadowsocks/server.py

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

Loading…
Cancel
Save