Projet

Général

Profil

0001-models-hide-graphics-magick-output-fixes-22906.patch

Benjamin Dauvergne, 29 mars 2018 17:03

Télécharger (1,21 ko)

Voir les différences:

Subject: [PATCH] models: hide graphics-magick output (fixes #22906)

 fargo/fargo/models.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
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
-