diff --git a/pywb/rewrite/rewrite_live.py b/pywb/rewrite/rewrite_live.py index 8378c5d0..0c9ff62c 100644 --- a/pywb/rewrite/rewrite_live.py +++ b/pywb/rewrite/rewrite_live.py @@ -189,7 +189,6 @@ class LiveRewriter(object): if not url.startswith('file:'): url = os.path.abspath(url) url = urljoin('file:', pathname2url(url)) - print(url) # explicit urlkey may be passed in (say for testing) if not urlkey: @@ -200,7 +199,7 @@ class LiveRewriter(object): req_headers, follow_redirects, ignore_proxies) - else: + else: (status_headers, stream) = self.fetch_local_file(url) if timestamp is None: diff --git a/pywb/warc/test/test_indexing.py b/pywb/warc/test/test_indexing.py index 51e82d96..2e704530 100644 --- a/pywb/warc/test/test_indexing.py +++ b/pywb/warc/test/test_indexing.py @@ -172,7 +172,7 @@ def read_fully(cdx): def cdx_index(warc, **options): buff = BytesIO() - with open(TEST_WARC_DIR + warc, 'rU') as fh: + with open(TEST_WARC_DIR + warc, 'rb') as fh: write_cdx_index(buff, fh, warc, **options) return buff.getvalue()