convert str to byte for write tempfile
This commit is contained in:
parent
9673ccfd83
commit
bd97135588
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ class D2langDirective(Directive):
|
|||
diag_source = self.content
|
||||
with tempfile.NamedTemporaryFile() as fp:
|
||||
for line in self.content:
|
||||
fp.write(line)
|
||||
fp.write(bytes(line,'utf-8'))
|
||||
cmd_line = '%s %s %s' % (d2_bin, fp.name, srcdir + "/test.svg")
|
||||
args = shlex.split(cmd_line)
|
||||
subprocess.run(args)
|
||||
|
|
Loading…
Reference in a new issue