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):
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