diff options
author | makefu <github@syntax-fehler.de> | 2014-03-25 23:08:35 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2014-03-25 23:08:35 +0100 |
commit | a727674d154d73a60edbefa27d9dd38db1d130cf (patch) | |
tree | fb4ea459e492edc7b7c88bc25123c06fbcf58321 | |
parent | a0abc19485f37475be36662fa4f05b6218f299d7 (diff) |
Reaktor: remove e-loop
-rwxr-xr-x | IRC/reaktor.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/IRC/reaktor.py b/IRC/reaktor.py index e73a3d7..830e6a9 100755 --- a/IRC/reaktor.py +++ b/IRC/reaktor.py @@ -12,10 +12,10 @@ getconf = make_getconf(config_filename) import logging,logging.handlers log = logging.getLogger('asybot') -hdlr = logging.handlers.SysLogHandler(facility=logging.handlers.SysLogHandler.LOG_DAEMON) -formatter = logging.Formatter( '%(filename)s: %(levelname)s: %(message)s') -hdlr.setFormatter(formatter) -log.addHandler(hdlr) +#hdlr = logging.handlers.SysLogHandler(address='/dev/log', facility=logging.handlers.SysLogHandler.LOG_DAEMON) +#formatter = logging.Formatter( '%(filename)s: %(levelname)s: %(message)s') +#hdlr.setFormatter(formatter) +#log.addHandler(hdlr) logging.basicConfig(level = logging.DEBUG if getconf('debug') else logging.INFO) restart_timeout = getconf('irc_restart_timeout') or 5 @@ -96,13 +96,5 @@ class Reaktor(asybot): self.ME(target, 'mimimi') if __name__ == "__main__": - while True: - try: - Reaktor() - loop() - except Exception as e: - from time import sleep - log.error("Something went wrong when running Reaktor, \ - waiting for %d seconds" % restart_timeout) - log.debug("Exception: %s" % str(e)) - sleep(restart_timeout) + Reaktor() + loop() |