libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [7/9] libcloud git commit: remove redundant and confusing else statements after a for loop without break clause
Date Mon, 10 Jul 2017 08:48:26 GMT
remove redundant and confusing else statements after a for loop without break clause


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

Branch: refs/heads/trunk
Commit: 8aa0076cceeca661602c4461a1545a1ead511f44
Parents: bd887c8
Author: jhelie <jean.helie@gmail.com>
Authored: Thu Jun 22 13:36:16 2017 +0100
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Mon Jul 10 09:48:02 2017 +0100

----------------------------------------------------------------------
 libcloud/common/ovh.py               | 3 +--
 libcloud/loadbalancer/drivers/elb.py | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/8aa0076c/libcloud/common/ovh.py
----------------------------------------------------------------------
diff --git a/libcloud/common/ovh.py b/libcloud/common/ovh.py
index 029e66f..260ea41 100644
--- a/libcloud/common/ovh.py
+++ b/libcloud/common/ovh.py
@@ -131,8 +131,7 @@ class OvhConnection(ConnectionUserAndKey):
             full_url += '?'
             for key, value in params.items():
                 full_url += '%s=%s&' % (key, value)
-            else:
-                full_url = full_url[:-1]
+            full_url = full_url[:-1]
         sha1 = hashlib.sha1()
         base_signature = "+".join([
             self.key,

http://git-wip-us.apache.org/repos/asf/libcloud/blob/8aa0076c/libcloud/loadbalancer/drivers/elb.py
----------------------------------------------------------------------
diff --git a/libcloud/loadbalancer/drivers/elb.py b/libcloud/loadbalancer/drivers/elb.py
index 766c86d..1eba3b9 100644
--- a/libcloud/loadbalancer/drivers/elb.py
+++ b/libcloud/loadbalancer/drivers/elb.py
@@ -308,8 +308,7 @@ class ElasticLBDriver(Driver):
             if protocol == 'HTTPS' or protocol == 'SSL':
                 params['Listeners.member.%d.   \
                         SSLCertificateId' % i] = listener[3]
-        else:
-            return False
+        return False
 
         response = self.connection.request(ROOT, params=params)
         return response.status == httplib.OK


Mime
View raw message