X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=xsetbg_db.py;h=c820c6d0a4ae7dcb37f1f6d7e7316a5410065460;hb=666424147b909d29d979d45990aa967e117f6cec;hp=4853afb8f75ba90a2c142020ccd60e84034bd36b;hpb=a337e26c169baecb75197b50db5fd734c39f6187;p=xsetbg.git diff --git a/xsetbg_db.py b/xsetbg_db.py old mode 100755 new mode 100644 index 4853afb..c820c6d --- a/xsetbg_db.py +++ b/xsetbg_db.py @@ -1,4 +1,3 @@ -#! /usr/bin/env python """XSetBg database """ @@ -12,11 +11,11 @@ __all__ = ['xsetbg_db'] import anydbm import os import shelve -from xsetbg_conf import xsetbg_dir, xsetbg_conf +from xsetbg_conf import xsetbg_conf -xsetbg_db_name = "xsetbg.db" +xsetbg_db_path = os.path.expanduser(xsetbg_conf.get('xsetbg', 'database')) try: - xsetbg_db = shelve.open(os.path.join(xsetbg_dir, xsetbg_db_name), 'r') + xsetbg_db = shelve.open(xsetbg_db_path, 'r') except anydbm.error: xsetbg_db = None