diff --git a/seminar/models.py b/seminar/models.py index b7147106..63c9bdfa 100644 --- a/seminar/models.py +++ b/seminar/models.py @@ -601,7 +601,7 @@ class Cislo(SeminarModelBase): if not self.titulka_nahled or os.path.getmtime(self.titulka_nahled.path) < os.path.getmtime(self.pdf.path): png_filename = pathlib.Path(tempfile.mkdtemp(), 'nahled.png') - subprocess.call([ + subprocess.run([ "convert", "-density", "300x300", "-geometry", "{}x{}".format(VYSKA, sirka), @@ -609,7 +609,10 @@ class Cislo(SeminarModelBase): "-flatten", "{}[0]".format(self.pdf.path), # titulní strana png_filename - ]) + ], + check=True, + capture_output=True + ) with open(png_filename,'rb') as f: self.titulka_nahled.save('',f,True)