diff options
author | makefu <github@syntax-fehler.de> | 2014-04-27 18:17:23 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2014-04-27 18:17:23 +0200 |
commit | aa4b1772353ddf520b210bb1a692ce1b604cba23 (patch) | |
tree | 416bf15d2c7a49542b53b805dd6a155e05735cf1 /Reaktor/IRC/reaktor.py | |
parent | adffcc9053665c52029cb96746ce28d9f334d18a (diff) | |
parent | 11a8e061d7b96df22c4793cbbd79cb8dba686513 (diff) |
Merge branch 'master' of ssh://github.com/krebscode/painload
Diffstat (limited to 'Reaktor/IRC/reaktor.py')
-rwxr-xr-x | Reaktor/IRC/reaktor.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Reaktor/IRC/reaktor.py b/Reaktor/IRC/reaktor.py index b53ef651..ec306e7c 100755 --- a/Reaktor/IRC/reaktor.py +++ b/Reaktor/IRC/reaktor.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os from ircasy import asybot from asyncore import loop @@ -36,7 +36,7 @@ class Reaktor(asybot): return False def on_join(self, prefix, command, params, rest): - for command in getconf('on_join'): + for command in getconf('on_join', []): self.execute_command(command, None, prefix, params) def on_privmsg(self, prefix, command, params, rest): @@ -69,6 +69,9 @@ class Reaktor(asybot): log.info("cannot parse args!") cwd = getconf('workdir') + if not os.access(cwd,os.W_OK): + log.error("Workdir '%s' is not Writable! Falling back to root dir"%cwd) + cwd = "/" env = command.get('env', {}) env['_prefix'] = prefix @@ -81,7 +84,6 @@ class Reaktor(asybot): target.append(env['_from']) log.debug('target:' +str(target)) - env['config_filename'] = os.path.abspath(self.config) start = time() try: p = popen(myargv, bufsize=1, stdout=PIPE, stderr=PIPE, env=env, cwd=cwd) |