diff options
-rwxr-xr-x | scripts/random_wallpaper.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/random_wallpaper.py b/scripts/random_wallpaper.py index 89105ec..fa9fd5d 100755 --- a/scripts/random_wallpaper.py +++ b/scripts/random_wallpaper.py @@ -48,13 +48,13 @@ if not os.path.isdir(os.path.expandvars('${FVWM_USERDIR}/tmp/')): sys.exit(-1) try: subprocess.check_call(['convert', os.path.join(d, f), '-resize', res, os.path.expandvars('${FVWM_USERDIR}/tmp/current_wall.png')]) -except subprocess.CalledProcessError: +except (subprocess.CalledProcessError, OSError): sys.stderr.write('Error resizing the wallpaper. Is Imagemagick installed?\n') sys.exit(-1) try: subprocess.check_call(['feh', '--bg-center', os.path.expandvars('${FVWM_USERDIR}/tmp/current_wall.png')]) -except subprocess.CalledProcessError: +except (subprocess.CalledProcessError, OSError): sys.stderr.write('Error setting the wallpaper. Is feh installed?\n') sys.exit(-1) |