In [1]:
import spot.aux

Make sure str_to_svg reports errors from dot.


In [2]:
spot.aux.str_to_svg(b'syntax error')


Calling 'dot' for the conversion to SVG produced the message:
Error: <stdin>: syntax error in line 1 near 'syntax'

---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
<ipython-input-2-877ef1b1c636> in <module>()
----> 1 spot.aux.str_to_svg(b'syntax error')

/home/adl/git/spot/python/spot/aux.py in str_to_svg(str)
     62     ret = dot.wait()
     63     if ret:
---> 64         raise subprocess.CalledProcessError(ret, 'dot')
     65     return stdout.decode('utf-8')
     66 

CalledProcessError: Command 'dot' returned non-zero exit status 1.