You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2016/03/07 10:46:57 UTC
[6/9] libcloud git commit: Removing unicode in favor of basestring
only
Removing unicode in favor of basestring only
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/f75ba88c
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/f75ba88c
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/f75ba88c
Branch: refs/heads/trunk
Commit: f75ba88c23431d1f2ae226e82d12efccc913fdaf
Parents: e43ca1d
Author: Jeffrey Dunham <je...@gmail.com>
Authored: Tue Feb 2 21:07:07 2016 -0500
Committer: anthony-shaw <an...@gmail.com>
Committed: Mon Mar 7 20:46:16 2016 +1100
----------------------------------------------------------------------
libcloud/common/dimensiondata.py | 4 ++--
libcloud/test/compute/test_dimensiondata.py | 7 -------
2 files changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f75ba88c/libcloud/common/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py
index 3febce0..635ee5e 100644
--- a/libcloud/common/dimensiondata.py
+++ b/libcloud/common/dimensiondata.py
@@ -304,11 +304,11 @@ def dd_object_to_id(obj, obj_type):
"""
if isinstance(obj, obj_type):
return obj.id
- elif isinstance(obj, (basestring, unicode)):
+ elif isinstance(obj, (basestring)):
return obj
else:
raise TypeError(
- "Invalid type %s looking for basestring/unicode or %s"
+ "Invalid type %s looking for basestring or %s"
% (type(obj).__name__, obj_type.__name__)
)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f75ba88c/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index fd1b6b2..50bbe20 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -728,13 +728,6 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
'NA9'
)
- def test_priv_location_to_location_id_UNICODE(self):
- datacenter = u'NA9'
- self.assertEqual(
- self.driver._location_to_location_id(datacenter),
- 'NA9'
- )
-
def test_priv_location_to_location_id_TYPEERROR(self):
with self.assertRaises(TypeError):
self.driver._location_to_location_id([1, 2, 3])