Skip to content

Commit

Permalink
Change log/progresss message "none" to "unspecified" to match Wget
Browse files Browse the repository at this point in the history
  • Loading branch information
chfoo committed Apr 10, 2015
1 parent 4ec014e commit 9fcf501
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Unreleased
==========

* Changed: when using ``--youtube-dl`` and ``--warc-file``, the JSON metedata file is now saved in the WARC file compatible with pywb.
* Changed: logging and progress meter to say "unspecified" instead of "none" when no content length is provided by server to match Wget.


1.1 (2015-04-03)
Expand Down
4 changes: 2 additions & 2 deletions wpull/processor/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ def _log_response(self, request, response):
status_code=response.status_code,
reason=wpull.string.printable_str(response.reason),
content_length=wpull.string.printable_str(
response.fields.get('Content-Length', _('none'))),
response.fields.get('Content-Length', _('unspecified'))),
content_type=wpull.string.printable_str(
response.fields.get('Content-Type', _('none'))),
response.fields.get('Content-Type', _('unspecified'))),
))

def _handle_response(self, request, response):
Expand Down
4 changes: 2 additions & 2 deletions wpull/recorder/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def pre_response(self, response):

self._println(
_(' Length: {content_length} [{content_type}]').format(
content_length=self._content_length or _('none'),
content_length=self._content_length or _('unspecified'),
content_type=wpull.string.printable_str(
content_type or _('none')
content_type or _('unspecified')
)
),
)
Expand Down

0 comments on commit 9fcf501

Please sign in to comment.