only output exception in verbose mode
This commit is contained in:
parent
ea70a5bd79
commit
2a61e80071
2 changed files with 6 additions and 4 deletions
|
@ -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__':
|
||||||
|
|
|
@ -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…
Reference in a new issue