git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a231f8
)
create the data directory if it doesnt already exist
author
Tony Mack
<tmack@cs.princeton.edu>
Wed, 11 Nov 2009 20:20:27 +0000
(20:20 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Wed, 11 Nov 2009 20:20:27 +0000
(20:20 +0000)
sfa/util/config.py
patch
|
blob
|
history
diff --git
a/sfa/util/config.py
b/sfa/util/config.py
index
37f3038
..
8a37997
100644
(file)
--- a/
sfa/util/config.py
+++ b/
sfa/util/config.py
@@
-48,6
+48,10
@@
class Config:
if not hasattr(self, 'SFA_CONFIG_DIR'):
# default to /var/lib/sfa not specified in config
self.SFA_CONFIG_DIR="/etc/sfa"
+
+ # create the data directory if it doesnt exist
+ if not os.path.isdir(self.SFA_DATA_DIR):
+ os.mkdir(self.SFA_DATA_DIR)
except IOError, e:
raise IOError, "Could not find the configuration file: %s" % config_file