]> git.phdru.name Git - xsetbg.git/commitdiff
Expand tilde in the database path
authorOleg Broytman <phd@phdru.name>
Tue, 7 Jan 2014 10:36:42 +0000 (14:36 +0400)
committerOleg Broytman <phd@phdru.name>
Tue, 7 Jan 2014 10:36:42 +0000 (14:36 +0400)
xsetbg_db.py

index d98e1b5a3ce0cc71fbd5f9eb1ec80b2abb64d0b3..43a37e73599c8126d081c2255e8439bf184689dd 100755 (executable)
@@ -10,10 +10,11 @@ __license__ = "GNU GPL"
 __all__ = ['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')