forked from extern/httpie-cli
Fixed args for Python 2.x
This commit is contained in:
parent
2a25d71aa4
commit
e2751e5fa3
@ -173,8 +173,10 @@ def main(args=sys.argv[1:], env=Environment(), custom_log_error=None):
|
|||||||
args = decode_args(args, env.stdin_encoding)
|
args = decode_args(args, env.stdin_encoding)
|
||||||
plugin_manager.load_installed_plugins()
|
plugin_manager.load_installed_plugins()
|
||||||
|
|
||||||
def log_error(msg, *args, level='error'):
|
def log_error(msg, *args, **kwargs):
|
||||||
msg = msg % args
|
msg = msg % args
|
||||||
|
level = kwargs.get('level', 'error')
|
||||||
|
assert level in ['error', 'warning']
|
||||||
env.stderr.write('\nhttp: %s: %s\n' % (level, msg))
|
env.stderr.write('\nhttp: %s: %s\n' % (level, msg))
|
||||||
|
|
||||||
from httpie.cli import parser
|
from httpie.cli import parser
|
||||||
|
Loading…
Reference in New Issue
Block a user