aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/util/config.py
diff options
context:
space:
mode:
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 4945b1f..f53f5b2 100644
--- a/libbe/storage/util/config.py
+++ b/libbe/storage/util/config.py
@@ -21,7 +21,7 @@
"""Create, save, and load the per-user config file at :py:func:`path`.
"""
-import ConfigParser
+import configparser
import codecs
import os
import os.path
@@ -71,7 +71,7 @@ def set_val(name, value, section="DEFAULT", encoding=None):
"""
if encoding == None:
encoding = default_encoding
- config = ConfigParser.ConfigParser()
+ 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)
@@ -114,13 +114,13 @@ def get_val(name, section="DEFAULT", default=None, encoding=None):
if os.path.exists(path()):
if encoding == None:
encoding = default_encoding
- config = ConfigParser.ConfigParser()
+ config = configparser.ConfigParser()
f = codecs.open(path(), 'r', encoding)
config.readfp(f, path())
f.close()
try:
return config.get(section, name)
- except ConfigParser.NoOptionError:
+ except configparser.NoOptionError:
return default
else:
return default