only output exception in verbose mode

This commit is contained in:
clowwindy 2014-09-12 23:06:18 +08:00
parent ea70a5bd79
commit 2a61e80071
2 changed files with 6 additions and 4 deletions

View file

@ -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__':

View file

@ -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: