libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [2/4] libcloud git commit: Conform to coding style.
Date Sat, 24 Jun 2017 09:31:59 GMT
Conform to coding style.


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

Branch: refs/heads/trunk
Commit: cd384718de8160f1c488a72d40187c797e45ee44
Parents: eb64253
Author: utam0k <utam0k.k0ma@gmail.com>
Authored: Thu Jun 22 16:46:21 2017 +0900
Committer: utam0k <utam0k.k0ma@gmail.com>
Committed: Thu Jun 22 16:46:21 2017 +0900

----------------------------------------------------------------------
 libcloud/common/openstack.py           | 33 ++++++++++++++++++-----------
 libcloud/storage/drivers/cloudfiles.py |  2 +-
 2 files changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/cd384718/libcloud/common/openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/common/openstack.py b/libcloud/common/openstack.py
index ac8e9c5..c9d8521 100644
--- a/libcloud/common/openstack.py
+++ b/libcloud/common/openstack.py
@@ -410,18 +410,27 @@ class OpenStackResponse(Response):
 
 class OpenStackDriverMixin(object):
 
-    def __init__(self, *args, **kwargs):
-        self._ex_force_base_url = kwargs.get('ex_force_base_url', None)
-        self._ex_force_auth_url = kwargs.get('ex_force_auth_url', None)
-        self._ex_force_auth_version = kwargs.get('ex_force_auth_version', None)
-        self._ex_force_auth_token = kwargs.get('ex_force_auth_token', None)
-        self._ex_token_scope = kwargs.get('ex_token_scope', None)
-        self._ex_domain_name = kwargs.get('ex_domain_name', None)
-        self._ex_tenant_name = kwargs.get('ex_tenant_name', None)
-        self._ex_force_service_type = kwargs.get('ex_force_service_type', None)
-        self._ex_force_service_name = kwargs.get('ex_force_service_name', None)
-        self._ex_force_service_region = kwargs.get('ex_force_service_region',
-                                                   None)
+    def __init__(self,
+                 ex_force_base_url=None,
+                 ex_force_auth_url=None,
+                 ex_force_auth_version=None,
+                 ex_force_auth_token=None,
+                 ex_token_scope=None,
+                 ex_domain_name=None,
+                 ex_tenant_name=None,
+                 ex_force_service_type=None,
+                 ex_force_service_name=None,
+                 ex_force_service_region=None, *args, **kwargs):
+        self._ex_force_base_url = ex_force_base_url
+        self._ex_force_auth_url = ex_force_auth_url
+        self._ex_force_auth_version = ex_force_auth_version
+        self._ex_force_auth_token = ex_force_auth_token
+        self._ex_token_scope = ex_token_scope
+        self._ex_domain_name = ex_domain_name
+        self._ex_tenant_name = ex_tenant_name
+        self._ex_force_service_type = ex_force_service_type
+        self._ex_force_service_name = ex_force_service_name
+        self._ex_force_service_region = ex_force_service_region
 
     def openstack_connection_kwargs(self):
         """

http://git-wip-us.apache.org/repos/asf/libcloud/blob/cd384718/libcloud/storage/drivers/cloudfiles.py
----------------------------------------------------------------------
diff --git a/libcloud/storage/drivers/cloudfiles.py b/libcloud/storage/drivers/cloudfiles.py
index 22ed856..1a249a1 100644
--- a/libcloud/storage/drivers/cloudfiles.py
+++ b/libcloud/storage/drivers/cloudfiles.py
@@ -259,7 +259,7 @@ class CloudFilesStorageDriver(StorageDriver, OpenStackDriverMixin):
             region = kwargs['ex_force_service_region']
 
         self.use_internal_url = use_internal_url
-        OpenStackDriverMixin.__init__(self, (), **kwargs)
+        OpenStackDriverMixin.__init__(self, **kwargs)
         super(CloudFilesStorageDriver, self).__init__(key=key, secret=secret,
                                                       secure=secure, host=host,
                                                       port=port, region=region,


Mime
View raw message