Python 3.3 fixes.

This commit is contained in:
Jakub Roztocil committed 2013-01-03 15:19:21 +01:00
1 parent 0ae9d7af58
commit 79c412064a
2 files changed
+6 -4

No files matched your search

+1 -3
View File
@@ -8,7 +8,6 @@ import inspect
import argparse
import functools
from . import __version__
from .input import RegexValidator
from .sessions import (Session, Host,
command_session_list,
@@ -18,8 +17,7 @@ from .sessions import (Session, Host,
parser = argparse.ArgumentParser(
description='The HTTPie management command.',
version=__version__
description='The HTTPie management command.'
)
subparsers = parser.add_subparsers()
+5 -1
View File
@@ -168,4 +168,8 @@ class HTTPRequest(HTTPMessage):
@property
def body(self):
return self._orig.body or b''
body = self._orig.body
if isinstance(body, str):
# Happens with JSON/form request data parsed from the command line.
body = body.encode('utf8')
return body or b''