From: Oleg Broytman Date: Tue, 7 Jan 2014 10:36:42 +0000 (+0400) Subject: Expand tilde in the database path X-Git-Tag: v4.1.0~14 X-Git-Url: https://git.phdru.name/?p=xsetbg.git;a=commitdiff_plain;h=21192b521520392055185f65e5764800edb41f32 Expand tilde in the database path --- diff --git a/xsetbg_db.py b/xsetbg_db.py index d98e1b5..43a37e7 100755 --- a/xsetbg_db.py +++ b/xsetbg_db.py @@ -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')