From: Jan Szejko Date: Tue, 27 Dec 2016 14:40:33 +0000 (+0100) Subject: stupid bug X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/30e68368555ff801a645746dfe9edc7aa39a70ff?ds=sidebyside;hp=e93c90799341b6627eca7fe03c7fefb95b4db9eb stupid bug --- diff --git a/librarian/formats/pdf/__init__.py b/librarian/formats/pdf/__init__.py index fd1fd5e..7d170b9 100644 --- a/librarian/formats/pdf/__init__.py +++ b/librarian/formats/pdf/__init__.py @@ -52,7 +52,7 @@ class PdfFormat(Format): def add_file(self, ctx, filename, url=None, path=None, image=False): from subprocess import call - if not url or path: + if not url and not path: raise BuildError('No URL or path for image') save_as = os.path.join(ctx.workdir, filename) if path is not None: