X-Git-Url: https://git.phdru.name/?p=xsetbg.git;a=blobdiff_plain;f=xsetbg_db.py;h=d98e1b5a3ce0cc71fbd5f9eb1ec80b2abb64d0b3;hp=4853afb8f75ba90a2c142020ccd60e84034bd36b;hb=76c9a423c497a1b7c2831087e02e6d8dbda5cb58;hpb=a337e26c169baecb75197b50db5fd734c39f6187 diff --git a/xsetbg_db.py b/xsetbg_db.py index 4853afb..d98e1b5 100755 --- a/xsetbg_db.py +++ b/xsetbg_db.py @@ -10,13 +10,12 @@ __license__ = "GNU GPL" __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 = 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