diff options
author | makefu <root@pigstarter.de> | 2014-04-25 15:22:51 +0200 |
---|---|---|
committer | makefu <root@pigstarter.de> | 2014-04-25 15:22:51 +0200 |
commit | 6df0fa8c961dd9884826488986892db3b2574ce8 (patch) | |
tree | c7ff031f89b6d7867ff12892e9236ad8c72d8d58 | |
parent | fe0a555e87f5e522e4d4e4a4f27a09c02e267590 (diff) |
add fallback for non existing directory
-rwxr-xr-x | Reaktor/IRC/reaktor.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Reaktor/IRC/reaktor.py b/Reaktor/IRC/reaktor.py index bfd08d9f..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 @@ -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 |