Silence wrong pylint errors

Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/30661267
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/30661267
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/30661267

Branch: refs/heads/trunk
Commit: 30661267475597ee0770ec454b92c4df67fd671e
Parents: 7fed326
Author: Mark S. Maglana <mmagl...@gmail.com>
Authored: Mon Sep 19 16:36:03 2016 -0700
Committer: Mark S. Maglana <mmagl...@gmail.com>
Committed: Mon Sep 19 16:36:03 2016 -0700

----------------------------------------------------------------------
 libcloud/common/dimensiondata.py | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/30661267/libcloud/common/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py
index 9562a9f..1f308d7 100644
--- a/libcloud/common/dimensiondata.py
+++ b/libcloud/common/dimensiondata.py
@@ -479,20 +479,23 @@ class DimensionDataConnection(ConnectionUserAndKey):
             params = {}
         params['pageSize'] = page_size
 
-        paged_resp = self.request_with_orgId_api_2(action, params,
-                                                   data, headers,
-                                                   method).object
-        yield paged_resp
-        if len(paged_resp) <= 0:
-            raise StopIteration
+        resp = self.request_with_orgId_api_2(action, params,
+                                             data, headers,
+                                             method).object
+        yield resp
+        if len(resp) <= 0:
+            raise StopIteration
 
-        while int(paged_resp.get('pageCount')) >= \
-                int(paged_resp.get('pageSize')):
-            params['pageNumber'] = int(paged_resp.get('pageNumber')) + 1
-            paged_resp = self.request_with_orgId_api_2(action, params,
-                                                       data, headers,
-                                                       method).object
-            yield paged_resp
+        pcount = resp.get('pageCount')  # pylint: disable=no-member
+        psize = resp.get('pageSize')  # pylint: disable=no-member
+        pnumber = resp.get('pageNumber')  # pylint: disable=no-member
+
+        while int(pcount) >= int(psize):
+            params['pageNumber'] = int(pnumber) + 1
+            resp = self.request_with_orgId_api_2(action, params,
+                                                 data, headers,
+                                                 method).object
+            yield resp
 
     def get_resource_path_api_1(self):
         """

Reply via email to