You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2021/11/04 19:36:33 UTC

[libcloud] branch trunk updated: Add some pylint ignore pragmas to fix false positives which only occur on CI but not locally.

This is an automated email from the ASF dual-hosted git repository.

tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 65c7efb  Add some pylint ignore pragmas to fix false positives which only occur on CI but not locally.
65c7efb is described below

commit 65c7efb589700bf5ea66ec4bebba07ffaf21425d
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Thu Nov 4 18:38:22 2021 +0100

    Add some pylint ignore pragmas to fix false positives which only occur
    on CI but not locally.
---
 libcloud/compute/drivers/abiquo.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libcloud/compute/drivers/abiquo.py b/libcloud/compute/drivers/abiquo.py
index fba1b01..5343f46 100644
--- a/libcloud/compute/drivers/abiquo.py
+++ b/libcloud/compute/drivers/abiquo.py
@@ -187,7 +187,9 @@ class AbiquoNodeDriver(NodeDriver):
                                                 data=tostring(vm_task),
                                                 headers=headers)
 
+        # pylint: disable=maybe-no-member
         if state == 'NOT_ALLOCATED' or res.async_success():
+            # pylint: enable=maybe-no-member
             self.connection.request(action=node.extra['uri_id'],
                                     method='DELETE')
             return True
@@ -368,7 +370,9 @@ class AbiquoNodeDriver(NodeDriver):
                                                 data=tostring(vm_task),
                                                 headers=headers)
 
+        # pylint: disable=maybe-no-member
         if state == 'NOT_DEPLOYED' or res.async_success():
+            # pylint: enable=maybe-no-member
             # The node is no longer deployed. Unregister it.
             self.connection.request(action=group.uri,
                                     method='DELETE')
@@ -542,7 +546,7 @@ class AbiquoNodeDriver(NodeDriver):
         reboot_hdr = {'Accept': self.AR_MIME_TYPE}
         res = self.connection.async_request(action=reboot_uri,
                                             method='POST', headers=reboot_hdr)
-        return res.async_success()
+        return res.async_success()  # pylint: disable=maybe-no-member
 
     # -------------------------
     # Extenstion methods
@@ -579,7 +583,7 @@ class AbiquoNodeDriver(NodeDriver):
         res = self.connection.async_request(action=link_deploy, method='POST',
                                             data=tostring(vm_task),
                                             headers=headers)
-        if not res.async_success():
+        if not res.async_success():  # pylint: disable=maybe-no-member
             raise LibcloudError('Could not run the node', self)
 
     def _to_location(self, vdc, dc, driver):