0001-misc-don-t-crash-if-GraphicsMagick-can-t-thumbnail-a.patch
wcs/qommon/misc.py | ||
---|---|---|
573 | 573 |
raise ThumbnailError() |
574 | 574 | |
575 | 575 |
if content_type == 'application/pdf': |
576 |
fp = StringIO(subprocess.check_output( |
|
577 |
['gm', 'convert', '-geometry', '500x', filepath, 'png:-'])) |
|
576 |
try: |
|
577 |
fp = StringIO(subprocess.check_output( |
|
578 |
['gm', 'convert', '-geometry', '500x', filepath, 'png:-'])) |
|
579 |
except subprocess.CalledProcessError: |
|
580 |
raise ThumbnailError() |
|
578 | 581 |
else: |
579 | 582 |
fp = open(filepath) |
580 | 583 | |
581 |
- |