]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
trivial: PEP8 fixes
authorStephen Finucane <stephen@that.guru>
Sun, 18 Dec 2016 22:39:13 +0000 (22:39 +0000)
committerStephen Finucane <stephen@that.guru>
Sun, 18 Dec 2016 22:39:13 +0000 (22:39 +0000)
Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/bin/pwclient

index fee6366f36fe0a41d7e76528c22c3861535030bb..cee8e2c01f1b04bdba9b9f27f3b85ab82ae09ed1 100755 (executable)
@@ -33,7 +33,6 @@ except ImportError:
 import argparse
 import string
 import subprocess
-import base64
 try:
     import ConfigParser
 except ImportError:
@@ -46,8 +45,8 @@ import locale
 
 if sys.version_info.major == 2:
     # hack to make writing unicode to standard output/error work on Python 2
-    OUT_ENCODING = sys.stdout.encoding or locale.getpreferredencoding() or \
-            os.getenv('PYTHONIOENCODING', 'utf-8')
+    OUT_ENCODING = (sys.stdout.encoding or locale.getpreferredencoding() or
+                    os.getenv('PYTHONIOENCODING', 'utf-8'))
     sys.stdout = io.open(sys.stdout.fileno(), mode='w',
                          encoding=OUT_ENCODING, errors='replace')
     sys.stderr = io.open(sys.stderr.fileno(), mode='w',
@@ -138,16 +137,15 @@ class Transport(xmlrpclib.SafeTransport):
             return xmlrpclib.Transport.make_connection(self, host)
 
     if sys.version_info[0] == 2:
-
         def send_request(self, connection, handler, request_body):
             handler = '%s://%s%s' % (self.scheme, self.host, handler)
-            xmlrpclib.Transport.send_request(self, connection, handler, request_body)
-
-    else: # Python 3
-
+            xmlrpclib.Transport.send_request(self, connection, handler,
+                                             request_body)
+    else:  # Python 3
         def send_request(self, host, handler, request_body, debug):
             handler = '%s://%s%s' % (self.scheme, host, handler)
-            return xmlrpclib.Transport.send_request(self, host, handler, request_body, debug)
+            return xmlrpclib.Transport.send_request(self, host, handler,
+                                                    request_body, debug)
 
 
 def project_id_by_name(rpc, linkname):