Fix refactoring errors
This commit is contained in:
parent
378062f541
commit
4c7f481634
2 changed files with 2 additions and 3 deletions
|
@ -84,7 +84,6 @@ def ensureFilesRemoved(pattern):
|
|||
def renderFrame(infile, task, outfile):
|
||||
width = 1920
|
||||
height = 1080
|
||||
infile = '{0}/.gen.svg'.format(task.workdir)
|
||||
if args.imagemagick:
|
||||
# invoke imagemagick to convert the generated svg-file into a png inside the .frames-directory
|
||||
with Image(filename=infile) as img:
|
||||
|
@ -92,7 +91,7 @@ def renderFrame(infile, task, outfile):
|
|||
converted.save(filename=outfile)
|
||||
else:
|
||||
# invoke inkscape to convert the generated svg-file into a png inside the .frames-directory
|
||||
cmd = 'cd {0} && inkscape --export-background=white --export-background-opacity=0 --export-width={1} --export-height={2} --export-png="{3}" "{4}" 2>&1 >/dev/null'.format(task.workdir, width, height, outfile, infile)
|
||||
cmd = 'inkscape --export-background=white --export-background-opacity=0 --export-width={1} --export-height={2} --export-png="{3}" "{4}" 2>&1 >/dev/null'.format(task.workdir, width, height, outfile, infile)
|
||||
errorReturn = subprocess.check_output(cmd, shell=True, universal_newlines=True, stderr=subprocess.STDOUT)
|
||||
if errorReturn != '':
|
||||
print("inkscape exitted with error\n" + errorReturn)
|
||||
|
|
|
@ -48,7 +48,7 @@ class SVGTemplate:
|
|||
# if '$subtitle' in task.parameters and task.parameters['$subtitle'] == '':
|
||||
# child = svg.findall(".//*[@id='subtitle']")[0]
|
||||
# child.getparent().remove(child)
|
||||
self.xmlstr = etree.tostring(svg, encoding='unicode')
|
||||
self.svgstr = etree.tostring(svg, encoding='unicode')
|
||||
|
||||
def __exit__(self, exception_type, exception_value, traceback):
|
||||
pass
|
||||
|
|
Loading…
Add table
Reference in a new issue