Fixed args for Python 2.x

This commit is contained in:
Jakub Roztocil 2016-03-01 21:27:26 +08:00
parent 2a25d71aa4
commit e2751e5fa3

View File

@ -173,8 +173,10 @@ def main(args=sys.argv[1:], env=Environment(), custom_log_error=None):
args = decode_args(args, env.stdin_encoding)
plugin_manager.load_installed_plugins()
def log_error(msg, *args, level='error'):
def log_error(msg, *args, **kwargs):
msg = msg % args
level = kwargs.get('level', 'error')
assert level in ['error', 'warning']
env.stderr.write('\nhttp: %s: %s\n' % (level, msg))
from httpie.cli import parser