]> git.phdru.name Git - xsetbg.git/blobdiff - xsetbg_conf.py
Fix(DB): Fix column encoding
[xsetbg.git] / xsetbg_conf.py
index 1066bfa7e8ba8f46577e0044e45270fe831553f4..1e54e6cccf34bbdd042eba66bca62bb651bcd870 100755 (executable)
@@ -1,10 +1,10 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 """XSetBg config
 
 """
 
 import os
-from ConfigParser import SafeConfigParser
+from configparser import ConfigParser
 
 __all__ = ['xsetbg_conf']
 
@@ -23,12 +23,12 @@ config_dirs.append(xsetbg_dir)
 for d in config_dirs:
     xsetbg_conf_file = os.path.join(d, 'xsetbg.conf')
     if os.path.exists(xsetbg_conf_file):
-        xsetbg_conf = SafeConfigParser()
+        xsetbg_conf = ConfigParser(inline_comment_prefixes=(';', '#'))
         xsetbg_conf.read(xsetbg_conf_file)
         break
 else:
     raise RuntimeError("Cannot find xsetbg.conf; searched %s", config_dirs)
 
 if __name__ == '__main__':
-    print "Config dirs:", config_dirs
-    print "Config file:", xsetbg_conf_file
+    print("Config dirs:", config_dirs)
+    print("Config file:", xsetbg_conf_file)