From a43dfc879bacb5eaae7cc7644983623c58efe02a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 7 Jan 2014 15:19:40 +0400 Subject: [PATCH] Fix a bug: open xsetbg.py with full path --- xsetbg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xsetbg.py b/xsetbg.py index ee9c5f8..d9472bc 100755 --- a/xsetbg.py +++ b/xsetbg.py @@ -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 -- 2.39.5