catch KeyError
This commit is contained in:
parent
fbf15cb942
commit
0cd261dd10
2 changed files with 4 additions and 4 deletions
|
@ -72,12 +72,12 @@ def main():
|
|||
|
||||
daemon.set_user(config.get('user', None))
|
||||
loop.run()
|
||||
except (KeyboardInterrupt, IOError, OSError) as e:
|
||||
except Exception as e:
|
||||
logging.error(e)
|
||||
if config['verbose']:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
os._exit(1)
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -87,12 +87,12 @@ def main():
|
|||
|
||||
daemon.set_user(config.get('user', None))
|
||||
loop.run()
|
||||
except (KeyboardInterrupt, IOError, OSError) as e:
|
||||
except Exception as e:
|
||||
logging.error(e)
|
||||
if config['verbose']:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
os._exit(1)
|
||||
sys.exit(1)
|
||||
|
||||
if int(config['workers']) > 1:
|
||||
if os.name == 'posix':
|
||||
|
|
Loading…
Add table
Reference in a new issue