summaryrefslogtreecommitdiffstats
path: root/Reaktor/IRC
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-03-25 23:08:35 +0100
committermakefu <github@syntax-fehler.de>2014-03-25 23:08:35 +0100
commitb49c3b339c34984b5408b18ba558e6a91fddf243 (patch)
tree5da1083ef5ab24b2761dc89883412d4f8ce42106 /Reaktor/IRC
parent87940df070cf000022ebce5b9feadd7485a3546e (diff)
Reaktor: remove e-loop
Diffstat (limited to 'Reaktor/IRC')
-rwxr-xr-xReaktor/IRC/reaktor.py20
1 files changed, 6 insertions, 14 deletions
diff --git a/Reaktor/IRC/reaktor.py b/Reaktor/IRC/reaktor.py
index e73a3d79..830e6a93 100755
--- a/Reaktor/IRC/reaktor.py
+++ b/Reaktor/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()