Skip to content

Commit e6e1758

Browse files
A few minor corrections
1 parent 94d6947 commit e6e1758

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

wpull/application/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ def _add_warc_args(self):
11191119
'--warc-split-meta',
11201120
action='store_true',
11211121
default=False,
1122-
help=_('split the log WARC along with the data WARC'),
1122+
help=_('when used with --warc-max-size, split the meta WARC as well, not just the data WARC'),
11231123
)
11241124

11251125
def _add_recursive_args(self):

wpull/url.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ def parse(cls, url, default_scheme='http', encoding='utf-8'):
130130
return None
131131

132132
url = url.strip()
133-
# TODO: \r\n\t should be removed from anywhere in the URL.
134133
if frozenset(url) & C0_CONTROL_SET:
135134
raise ValueError('URL contains control codes: {}'.format(ascii(url)))
136135

wpull/warc/recorder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,7 @@ def _flush_log(self, closing=False):
218218
)
219219
log_record.set_common_fields('resource', 'text/plain')
220220

221-
log_record.fields['WARC-Target-URI'] = \
222-
'urn:X-wpull:log'
221+
log_record.fields['WARC-Target-URI'] = 'urn:X-wpull:log'
223222

224223
if self._params.max_size is not None: # Only create a separate meta WARC if max_size is set
225224
self._start_new_warc_file(meta=True)

wpull/warc/recorder_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,9 @@ def test_warc_recorder_max_size_split_meta(self):
336336
params=WARCRecorderParams(
337337
compress=False,
338338
extra_fields=[('Extra-field', 'my_extra_field')],
339-
cdx=True, max_size=1,
340-
split_meta = True,
339+
cdx=True,
340+
max_size=1,
341+
split_meta=True,
341342
)
342343
)
343344

0 commit comments

Comments
 (0)