aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVG <vg@devys.org>2015-01-27 12:15:04 +0100
committerVG <vg@devys.org>2015-01-27 12:15:23 +0100
commit3d564cacf42c8904be31eb398e14a31cf387ed30 (patch)
treeea56fa266b55d6faeaa055998f4c04b7fe08ab0d
parent959bfc9e06cf43b94a57a3f8abc7e6c1f29bea55 (diff)
downloadpasteme-3d564cacf42c8904be31eb398e14a31cf387ed30.tar.gz
pasteme-3d564cacf42c8904be31eb398e14a31cf387ed30.tar.bz2
pasteme-3d564cacf42c8904be31eb398e14a31cf387ed30.zip
Fix configuration file to change directory automatically
- the pastes store directory reflects environment: /tmp/pastes for developing and /pastes for production.
-rw-r--r--config.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/config.py b/config.py
index 8b53f8c..240b0aa 100644
--- a/config.py
+++ b/config.py
@@ -1,7 +1,9 @@
# configuration file of pastme service
+import os.path
+
# the directory where the pastes are stored
-pastedir = '/tmp/pastes'
+pastedir = '/pastes' if os.path.exists('/pastes') else '/tmp/pastes'
# how many days a paste remain stored
timeout = 30