X-Git-Url: https://git.phdru.name/?p=xsetbg.git;a=blobdiff_plain;f=xsetbg.py;h=ac55e25f4271ae60c300ead1650c5287e88009a8;hp=f4426ee6f121b8af3c6451345531d583e4e1f5a7;hb=76c9a423c497a1b7c2831087e02e6d8dbda5cb58;hpb=a337e26c169baecb75197b50db5fd734c39f6187 diff --git a/xsetbg.py b/xsetbg.py index f4426ee..ac55e25 100755 --- a/xsetbg.py +++ b/xsetbg.py @@ -26,7 +26,7 @@ import sys from time import time from xsetbg_conf import xsetbg_dir, xsetbg_conf -from xsetbg_db import xsetbg_db_name, xsetbg_db +from xsetbg_db import xsetbg_db def error(error_str, error_code=1): @@ -116,11 +116,11 @@ os.umask(0066) # octal; -rw-------; make the global persistent dictionary # readable only by the user try: - xsetbg_db = shelve.open(os.path.join(xsetbg_dir, xsetbg_db_name), flag='c') + xsetbg_db = shelve.open(xsetbg_db_path, flag='c') except anydbm.error, msg: if str(msg) == "db type could not be determined": - os.remove(xsetbg_db_name) - xsetbg_db = shelve.open(os.path.join(xsetbg_dir, xsetbg_db_name), flag='c') + os.remove(xsetbg_db_path) + xsetbg_db = shelve.open(xsetbg_db_path, flag='c') # Remove old filenames old_time = time() - min_delay @@ -164,7 +164,7 @@ def change(force=False): xsetbg_db = None try: # Reopen the global persistent dictionary - xsetbg_db = shelve.open(os.path.join(xsetbg_dir, xsetbg_db_name), 'w') + xsetbg_db = shelve.open(xsetbg_db_path, 'w') timestamp = xsetbg_db.get(timestamp_key) current_time = time()