Skip to content

Commit

Permalink
Imagemagick 7 stdout notice
Browse files Browse the repository at this point in the history
inform users about the imagemagick 7 policy change if they get an error at runtime.
  • Loading branch information
eylles committed May 7, 2024
1 parent df14992 commit 1ebea0b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pywal/backends/wal.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ def imagemagick(color_count, img, magick_command):
"-unique-colors", "txt:-"]
img += "[0]"

return subprocess.check_output([*magick_command, img, *flags]).splitlines()
try:
output = subprocess.check_output([*magick_command, img, *flags],
stderr=subprocess.STDOUT).splitlines()
except subprocess.CalledProcessError as Err:
logging.error("Imagemagick error: %s", Err)
logging.error(
"IM 7 disables stdout by default, check the wiki for the fix."
)
sys.exit(1)
return output


def has_im():
Expand Down

0 comments on commit 1ebea0b

Please sign in to comment.