0001-models-hide-graphics-magick-output-fixes-22906.patch
fargo/fargo/models.py | ||
---|---|---|
219 | 219 |
dirpath = os.path.dirname(instance.thumbnail_full_path) |
220 | 220 |
if not os.path.isdir(dirpath): |
221 | 221 |
os.makedirs(dirpath) |
222 |
subprocess.call(['gm', 'convert', '-geometry', 'x200', |
|
223 |
instance.content.file.name, |
|
224 |
instance.thumbnail_full_path]) |
|
222 |
with open(os.devnull, 'w') as devnull: |
|
223 |
subprocess.call(['gm', 'convert', '-geometry', 'x200', |
|
224 |
instance.content.file.name, |
|
225 |
instance.thumbnail_full_path], |
|
226 |
stdout=devnull, |
|
227 |
stderr=devnull) |
|
225 | 228 |
threading.Thread(target=do).start() |
226 | 229 | |
227 | 230 | |
228 |
- |