optimize: fix error in Py3.5

This commit is contained in:
James R. Barlow
2018-06-06 12:25:32 -07:00
parent a13c398c06
commit 04d79b15b4
+2 -2
View File
@@ -30,7 +30,7 @@ import pikepdf
from ._jobcontext import JobContext
from . import leptonica
from .helpers import re_symlink
from .helpers import re_symlink, fspath
from .exec import pngquant, jbig2enc
PAGE_GROUP_SIZE = 10
@@ -363,7 +363,7 @@ def main(infile, outfile, level, jobs=1):
with TemporaryDirectory() as td:
tmpout = Path(td) / 'out.pdf'
optimize(infile, tmpout, log, ctx)
copy(tmpout, outfile)
copy(fspath(tmpout), fspath(outfile))
if __name__ == '__main__':