Pass the logo filename as the url parameter

Otherwise the file data never gets read by cairosvg.

Fixes: commit 8dfc4111

Traceback (most recent call last):
  File "bin/logo-to-planet-head", line 45, in <module>
    process_svg()
  File "bin/logo-to-planet-head", line 35, in process_svg
    parent_height=default_size[1])
  File "/usr/lib/python3/dist-packages/cairosvg/__init__.py", line 43, in <lambda>
    surface_type.convert(*args, **kwargs))(_surface_type)
  File "/usr/lib/python3/dist-packages/cairosvg/surface/__init__.py", line 103, in convert
    tree = Tree(**kwargs)
  File "/usr/lib/python3/dist-packages/cairosvg/parser.py", line 270, in __init__
    tree = ElementTree.fromstring(bytestring)
  File "src/lxml/lxml.etree.pyx", line 3213, in lxml.etree.fromstring (src/lxml/lxml.etree.c:79003)
  File "src/lxml/parser.pxi", line 1848, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:118334)
  File "src/lxml/parser.pxi", line 1729, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:116892)
  File "src/lxml/parser.pxi", line 1063, in lxml.etree._BaseParser._parseUnicodeDoc (src/lxml/lxml.etree.c:110879)
  File "src/lxml/parser.pxi", line 595, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:105102)
  File "src/lxml/parser.pxi", line 706, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:106810)
  File "src/lxml/parser.pxi", line 635, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:105664)
  File "<string>", line 1
lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1
parent d9fac4b6
......@@ -30,7 +30,7 @@ def symlink(source, link):
def process_svg():
import cairosvg
cairosvg.svg2png(logo, write_to=head,
cairosvg.svg2png(url=logo, write_to=head,
parent_width=default_size[0],
parent_height=default_size[1])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment