[PATCH] fix more #pylint issues

Mike McLean mikem at redhat.com
Thu Jun 4 15:58:19 UTC 2015


---
 hub/kojixmlrpc.py | 2 +-
 koji/__init__.py  | 4 ++--
 koji/daemon.py    | 2 +-
 koji/server.py    | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hub/kojixmlrpc.py b/hub/kojixmlrpc.py
index 0e51012..efb99a6 100644
--- a/hub/kojixmlrpc.py
+++ b/hub/kojixmlrpc.py
@@ -192,7 +192,7 @@ class HandlerAccess(object):
         return self.__reg.get(__name)(*args, **kwargs)
 
     def get(self, name):
-        return self.__Reg.get(name)
+        return self.__reg.get(name)
 
 
 class ModXMLRPCRequestHandler(object):
diff --git a/koji/__init__.py b/koji/__init__.py
index c3a0990..e38a208 100644
--- a/koji/__init__.py
+++ b/koji/__init__.py
@@ -2037,10 +2037,10 @@ class ClientSession(object):
             chk_opts['verify'] = 'adler32'
         result = self._callMethod('checkUpload', (path, name), chk_opts)
         if int(result['size']) != ofs:
-            raise koji.GenericError, "Uploaded file is wrong length: %s/%s, %s != %s" \
+            raise GenericError, "Uploaded file is wrong length: %s/%s, %s != %s" \
                     % (path, name, result['sumlength'], ofs)
         if problems and result['hexdigest'] != full_chksum.hexdigest():
-            raise koji.GenericError, "Uploaded file has wrong checksum: %s/%s, %s != %s" \
+            raise GenericError, "Uploaded file has wrong checksum: %s/%s, %s != %s" \
                     % (path, name, result['hexdigest'], full_chksum.hexdigest())
         self.logger.debug("Fast upload: %s complete. %i bytes in %.1f seconds", localfile, size, t2)
 
diff --git a/koji/daemon.py b/koji/daemon.py
index d76355b..0570faa 100644
--- a/koji/daemon.py
+++ b/koji/daemon.py
@@ -266,7 +266,7 @@ class SCM(object):
 
         # check for validity: params should be empty, query may be empty, everything else should be populated
         if params :
-            raise koji.GenericError, 'Unable to parse SCM URL: %s . Param element %s should be empty.' % (self.url,param)
+            raise koji.GenericError, 'Unable to parse SCM URL: %s . Params element %s should be empty.' % (self.url, params)
         if not scheme :
             raise koji.GenericError, 'Unable to parse SCM URL: %s . Could not find the scheme element.' % self.url
         if not netloc :
diff --git a/koji/server.py b/koji/server.py
index 7cc8be8..52f13f5 100644
--- a/koji/server.py
+++ b/koji/server.py
@@ -158,7 +158,7 @@ class WSGIWrapper(object):
             for chunk in result:
                 if chunk and not self.set_headers:
                     raise RuntimeError, "write() called before start_response()"
-                write(data)
+                write(chunk)
         if not req.bytes_sent:
             #application sent nothing back
             req.set_content_length(0)
-- 
1.9.3



More information about the koji-devel mailing list