aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/util/config.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-14 07:37:51 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-14 07:37:51 -0500
commit19fe0817ba7c2cd04caea3adfa82d4490288a548 (patch)
tree6291cac9b9861f1009d63a419c3e79879f356bc8 /libbe/storage/util/config.py
parent2f0ceedba5b6619faf476cd1aa67e826e91d5c7c (diff)
downloadbugseverywhere-19fe0817ba7c2cd04caea3adfa82d4490288a548.tar.gz
Transitioned comment to Command format
Diffstat (limited to 'libbe/storage/util/config.py')
-rw-r--r--libbe/storage/util/config.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbe/storage/util/config.py b/libbe/storage/util/config.py
index a0fea0c..a0a252e 100644
--- a/libbe/storage/util/config.py
+++ b/libbe/storage/util/config.py
@@ -47,15 +47,15 @@ def set_val(name, value, section="DEFAULT", 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)
+ open(path(), 'w').close() # read chokes on missing file
+ f = codecs.open(path(), 'r', encoding)
config.readfp(f, path())
f.close()
if value is not None:
config.set(section, name, value)
else:
config.remove_option(section, name)
- f = codecs.open(path(), "w", encoding)
+ f = codecs.open(path(), 'w', encoding)
config.write(f)
f.close()
@@ -79,7 +79,7 @@ def get_val(name, section="DEFAULT", default=None, encoding=None):
if encoding == None:
encoding = default_encoding
config = ConfigParser.ConfigParser()
- f = codecs.open(path(), "r", encoding)
+ f = codecs.open(path(), 'r', encoding)
config.readfp(f, path())
f.close()
try: