analyze inkscape stderr to detect svg issues
This commit is contained in:
parent
735d35801b
commit
36ec438c58
1 changed files with 7 additions and 1 deletions
|
@ -17,6 +17,7 @@ import tempfile
|
||||||
import threading
|
import threading
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
from threading import Thread, Lock
|
from threading import Thread, Lock
|
||||||
|
import subprocess
|
||||||
from Queue import Queue
|
from Queue import Queue
|
||||||
|
|
||||||
# URL to Schedule-XML
|
# URL to Schedule-XML
|
||||||
|
@ -222,11 +223,16 @@ def render(infile, outfile, sequence, parameters={}, workdir='artwork'):
|
||||||
fp.write( etree.tostring(svg) )
|
fp.write( etree.tostring(svg) )
|
||||||
|
|
||||||
# invoke inkscape to convert the generated svg-file into a png inside the .frames-directory
|
# invoke inkscape to convert the generated svg-file into a png inside the .frames-directory
|
||||||
os.system('cd {0} && inkscape --export-png=.frames/{1:04d}.png .gen.svg >/dev/null 2>&1'.format(workdir, frameNr))
|
errorReturn = subprocess.check_output('cd {0} && inkscape --export-png=.frames/{1:04d}.png .gen.svg 2>&1 >/dev/null'.format(workdir, frameNr), shell=True)
|
||||||
|
if errorReturn != '':
|
||||||
|
print "inkscape exitted with error\n"+errorReturn
|
||||||
|
sys.exit(42)
|
||||||
|
|
||||||
# incrwement frame-number
|
# incrwement frame-number
|
||||||
frameNr += 1
|
frameNr += 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# remove the dv we are about to (re-)generate
|
# remove the dv we are about to (re-)generate
|
||||||
ensureFilesRemoved(os.path.join(workdir, outfile))
|
ensureFilesRemoved(os.path.join(workdir, outfile))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue