summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfenn <fenn@sdf.lonestar.org>2014-11-14 16:58:34 -0500
committerfenn <fenn@sdf.lonestar.org>2014-11-14 16:59:02 -0500
commit713e978faf3244eb322f9e32d6eb6bce1b03acdd (patch)
tree49f6ca33fce3c540ee176bb3af835690484368e4
parent9a702bb17ba42307f03c0e4450445c7847732124 (diff)
downloadpaperbot-713e978faf3244eb322f9e32d6eb6bce1b03acdd.tar.gz
paperbot-713e978faf3244eb322f9e32d6eb6bce1b03acdd.zip
dont puke if the storage path is not writable
-rw-r--r--paperbot/storage.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/paperbot/storage.py b/paperbot/storage.py
index bae0717..36ec861 100644
--- a/paperbot/storage.py
+++ b/paperbot/storage.py
@@ -12,7 +12,7 @@ import logging
log = logging.getLogger("paperbot.storage")
DEFAULT_STORAGE_PATH = "/home/bryan/public_html/papers2/paperbot/"
-if not os.path.exists(DEFAULT_STORAGE_PATH):
+if not (os.path.exists(DEFAULT_STORAGE_PATH) and os.access(DEFAULT_STORAGE_PATH, os.W_OK)):
DEFAULT_STORAGE_PATH = "/tmp/"
STORAGE_PATH = os.environ.get("STORAGE_PATH", DEFAULT_STORAGE_PATH)