mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
tests: fix indexing test, remove extra space/print
This commit is contained in:
parent
d5c22e3649
commit
7f52ecdca9
@ -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:
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user