Commit 7fc1c157 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Handle an empty or non-existent wallpaper directory

parent 589953bb
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ else:
	cmd = ['feh', '--no-fehbg', '--no-xinerama', '--bg-fill', None]

while 1:
	cmd[-1] = random.choice(list(all_files()))
	files = list(all_files())
	if files:
		cmd[-1] = random.choice(files)
		subprocess.call(cmd)
	time.sleep(random.randint(MIN_DELAY_SECS, MAX_DELAY_SECS))