]> git.phdru.name Git - xsetbg.git/blobdiff - xsetbg_db.py
Remove absolute directory ~/lib to make it portable
[xsetbg.git] / xsetbg_db.py
old mode 100755 (executable)
new mode 100644 (file)
index d98e1b5..54bc62e
@@ -1,4 +1,3 @@
-#! /usr/bin/env python
 """XSetBg database
 
 """
@@ -7,13 +6,14 @@ __author__ = "Oleg Broytman <phd@phdru.name>"
 __copyright__ = "Copyright (C) 2014 PhiloSoft Design"
 __license__ = "GNU GPL"
 
-__all__ = ['xsetbg_db']
+__all__ = ['xsetbg_db_path', 'xsetbg_db']
 
 import anydbm
+import os
 import shelve
 from xsetbg_conf import xsetbg_conf
 
-xsetbg_db_path = xsetbg_conf.get('xsetbg', 'database')
+xsetbg_db_path = os.path.expanduser(xsetbg_conf.get('xsetbg', 'database'))
 
 try:
     xsetbg_db = shelve.open(xsetbg_db_path, 'r')