From: Jan Szejko Date: Fri, 23 Nov 2018 13:03:58 +0000 (+0100) Subject: fix for perl 5.26+ X-Git-Tag: 1.7~10 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/74dd02ea5d106d125877b16cd8b5712c5361714f?ds=sidebyside;hp=2efffe35d382709702c66b9f03131662ae2605fb fix for perl 5.26+ --- diff --git a/librarian/epub.py b/librarian/epub.py index 8d4e73f..c802ec7 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -675,12 +675,13 @@ def transform(wldoc, verbose=False, style=None, html_toc=False, ''.join(chars).encode('utf-8'), get_resource('fonts/' + fname), os.path.join(tmpdir, fname)] + env = {"PERL_USE_UNSAFE_INC": "1"} if verbose: print "Running font-optimizer" - subprocess.check_call(optimizer_call) + subprocess.check_call(optimizer_call, env=env) else: dev_null = open(os.devnull, 'w') - subprocess.check_call(optimizer_call, stdout=dev_null, stderr=dev_null) + subprocess.check_call(optimizer_call, stdout=dev_null, stderr=dev_null, env=env) zip.write(os.path.join(tmpdir, fname), os.path.join('OPS', fname)) manifest.append(etree.fromstring( '' % (fname, fname)))