From 30e68368555ff801a645746dfe9edc7aa39a70ff Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Tue, 27 Dec 2016 15:40:33 +0100 Subject: [PATCH 1/1] stupid bug --- librarian/formats/pdf/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.20.1