aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/config.py')
-rw-r--r--libbe/config.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/libbe/config.py b/libbe/config.py
index 9b1682a..e696eeb 100644
--- a/libbe/config.py
+++ b/libbe/config.py
@@ -37,6 +37,8 @@ def set_val(name, value, section="DEFAULT", encoding=None):
if encoding == None:
encoding = default_encoding
config = ConfigParser.ConfigParser()
+ if os.path.exists(path()) == False: # touch file or config
+ open(path(), "w").close() # read chokes on missing file
f = codecs.open(path(), "r", encoding)
config.readfp(f, path())
f.close()