libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [30/40] libcloud git commit: Replace Distutils.version LooseVersion with a customised version. Temp workaround until Travis CI support Distutils.version with pylint
Date Fri, 02 Dec 2016 04:33:32 GMT
Replace Distutils.version LooseVersion with a customised version. Temp workaround until Travis
CI support Distutils.version with pylint


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

Branch: refs/heads/trunk
Commit: 13eee8a4e71d6f1c7ba3fd142bd4aedbe77f2085
Parents: d8cdb92
Author: Samuel Chong <samuelchong1@gmail.com>
Authored: Thu Nov 24 12:28:04 2016 +1100
Committer: Samuel Chong <samuelchong1@gmail.com>
Committed: Thu Nov 24 12:28:04 2016 +1100

----------------------------------------------------------------------
 libcloud/common/dimensiondata.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/13eee8a4/libcloud/common/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py
index 0cb726f..a8f5917 100644
--- a/libcloud/common/dimensiondata.py
+++ b/libcloud/common/dimensiondata.py
@@ -17,18 +17,15 @@ Dimension Data Common Components
 """
 from base64 import b64encode
 from time import sleep
-
-try:
-    from distutils.version import LooseVersion  # pylint: disable=import-error
-except ImportError:
-    pass
-
+# TODO: use disutils.version when Travis CI fixed the pylint issue with version
+# from distutils.version import LooseVersion
 from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import b
 from libcloud.common.base import ConnectionUserAndKey, XmlResponse, RawResponse
 from libcloud.compute.base import Node
 from libcloud.utils.py3 import basestring
 from libcloud.utils.xml import findtext
+from libcloud.compute.types import LibcloudError, InvalidCredsError
 
 # Roadmap / TODO:
 #
@@ -318,6 +315,12 @@ def dd_object_to_id(obj, obj_type, id_value='id'):
         )
 
 
+# TODO: use disutils.version when Travis CI fixed the pylint issue with version
+#       This is a temporary workaround.
+def LooseVersion(version):
+    return float(version)
+
+
 class NetworkDomainServicePlan(object):
     ESSENTIALS = "ESSENTIALS"
     ADVANCED = "ADVANCED"


Mime
View raw message