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