]> git.phdru.name Git - xsetbg.git/blobdiff - xsetbg.py
Export xsetbg_db_path
[xsetbg.git] / xsetbg.py
index ac55e25f4271ae60c300ead1650c5287e88009a8..d9472bcc0b032d66fa52da1d5cab499df6c51edd 100755 (executable)
--- 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
+from xsetbg_db import xsetbg_db_path
 
 
 def error(error_str, error_code=1):
@@ -153,7 +153,8 @@ if not images:
 def change(force=False):
    # Use the program's file as the lock file:
    # lock it to prevent two processes run in parallel.
-   lock_file = open("xsetbg.py", 'r')
+   lock_file = open(os.path.join(xsetbg_dir, 'xsetbg.py'), 'r')
+
    try:
       flock(lock_file, LOCK_EX|LOCK_NB)
    except IOError: # already locked