From 63b512054c9be18d5b4a784cefa309440c2cd231 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 17 Aug 2014 10:43:54 +0530 Subject: [PATCH] pep8 --- src/calibre/ebooks/pdf/pdftohtml.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/calibre/ebooks/pdf/pdftohtml.py b/src/calibre/ebooks/pdf/pdftohtml.py index 438a1d0b1b..5820acb7bf 100644 --- a/src/calibre/ebooks/pdf/pdftohtml.py +++ b/src/calibre/ebooks/pdf/pdftohtml.py @@ -20,7 +20,7 @@ if isosx and hasattr(sys, 'frameworks_dir'): PDFTOHTML = os.path.join(getattr(sys, 'frameworks_dir'), PDFTOHTML) if iswindows and hasattr(sys, 'frozen'): PDFTOHTML = os.path.join(os.path.dirname(sys.executable), 'pdftohtml.exe') - popen = partial(subprocess.Popen, creationflags=0x08) # CREATE_NO_WINDOW=0x08 so that no ugly console is popped up + popen = partial(subprocess.Popen, creationflags=0x08) # CREATE_NO_WINDOW=0x08 so that no ugly console is popped up if (islinux or isbsd) and getattr(sys, 'frozen', False): PDFTOHTML = os.path.join(sys.executables_location, 'bin', 'pdftohtml') @@ -121,13 +121,15 @@ def flip_images(raw): for match in re.finditer(b']+/?>', raw, flags=re.I): img = match.group() m = re.search(br'class="(x|y|xy)flip"', img) - if m is None: continue + if m is None: + continue flip = m.group(1) src = re.search(br'src="([^"]+)"', img) - if src is None: continue + if src is None: + continue img = src.group(1) - if not os.path.exists(img): continue + if not os.path.exists(img): + continue flip_image(img, flip) raw = re.sub(br'\s*', b'', raw, flags=re.I|re.DOTALL) return raw -