forked from extern/httpie-cli
codestyle fixes
This commit is contained in:
parent
9c2c058ae5
commit
8f6bee9196
@ -213,7 +213,7 @@ output_processing.add_argument(
|
|||||||
""".format(
|
""".format(
|
||||||
default=DEFAULT_STYLE,
|
default=DEFAULT_STYLE,
|
||||||
available='\n'.join(
|
available='\n'.join(
|
||||||
'{0}{1}'.format(8*' ', line.strip())
|
'{0}{1}'.format(8 * ' ', line.strip())
|
||||||
for line in wrap(', '.join(sorted(AVAILABLE_STYLES)), 60)
|
for line in wrap(', '.join(sorted(AVAILABLE_STYLES)), 60)
|
||||||
).rstrip(),
|
).rstrip(),
|
||||||
)
|
)
|
||||||
|
@ -243,7 +243,7 @@ def main(args=sys.argv[1:], env=Environment(), custom_log_error=None):
|
|||||||
except requests.TooManyRedirects:
|
except requests.TooManyRedirects:
|
||||||
exit_status = ExitStatus.ERROR_TOO_MANY_REDIRECTS
|
exit_status = ExitStatus.ERROR_TOO_MANY_REDIRECTS
|
||||||
log_error('Too many redirects (--max-redirects=%s).',
|
log_error('Too many redirects (--max-redirects=%s).',
|
||||||
parsed_args.max_redirects)
|
parsed_args.max_redirects)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# TODO: Further distinction between expected and unexpected errors.
|
# TODO: Further distinction between expected and unexpected errors.
|
||||||
msg = str(e)
|
msg = str(e)
|
||||||
|
@ -108,8 +108,8 @@ class TestItemParsing:
|
|||||||
|
|
||||||
# Parsed file fields
|
# Parsed file fields
|
||||||
assert 'file' in items.files
|
assert 'file' in items.files
|
||||||
assert (items.files['file'][1].read().strip().decode('utf8')
|
assert (items.files['file'][1].read().strip().
|
||||||
== FILE_CONTENT)
|
decode('utf8') == FILE_CONTENT)
|
||||||
|
|
||||||
def test_multiple_file_fields_with_same_field_name(self):
|
def test_multiple_file_fields_with_same_field_name(self):
|
||||||
items = input.parse_items([
|
items = input.parse_items([
|
||||||
|
Loading…
Reference in New Issue
Block a user