diff options
-rwxr-xr-x | patchwork/bin/pwclient | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/patchwork/bin/pwclient b/patchwork/bin/pwclient index 5fcb084..ceccbf3 100755 --- a/patchwork/bin/pwclient +++ b/patchwork/bin/pwclient @@ -97,6 +97,13 @@ class Filter(object): return str(self.d) +if sys.version_info[0] < 3: + # the python 2.7 reference implementation tries to re-encode to + # ascii bytes here but leaves unicode if it fails. Do not try to + # re-encode to ascii byte string to have a more predictive behavior. + xmlrpclib._stringify = lambda s: s + + class Transport(xmlrpclib.SafeTransport): def __init__(self, url): |