From 6df0fa8c961dd9884826488986892db3b2574ce8 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 25 Apr 2014 15:22:51 +0200 Subject: add fallback for non existing directory --- Reaktor/IRC/reaktor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3