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 2013/09/04 12:28:20 UTC

[13/14] git commit: Fix a nasty test case which was failing under 3.3.

Fix a nasty test case which was failing under 3.3.


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

Branch: refs/heads/0.13.1
Commit: 5926d03e3c324696b761e180551bcf106e2a425d
Parents: c96e7a9
Author: Tomaz Muraus <to...@apache.org>
Authored: Thu Aug 8 15:13:34 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Wed Sep 4 12:12:18 2013 +0200

----------------------------------------------------------------------
 libcloud/compute/drivers/vcloud.py   | 4 +---
 libcloud/test/compute/test_vcloud.py | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5926d03e/libcloud/compute/drivers/vcloud.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/vcloud.py b/libcloud/compute/drivers/vcloud.py
index e7d9a7e..b258618 100644
--- a/libcloud/compute/drivers/vcloud.py
+++ b/libcloud/compute/drivers/vcloud.py
@@ -31,7 +31,6 @@ urlparse = urlparse.urlparse
 import time
 
 from xml.etree import ElementTree as ET
-from xml.etree.ElementTree import _ElementInterface
 from xml.parsers.expat import ExpatError
 
 from libcloud.common.base import XmlResponse, ConnectionUserAndKey
@@ -588,8 +587,7 @@ class VCloudNodeDriver(NodeDriver):
                 except Exception:
                     # The vApp was probably removed since the previous vDC query, ignore
                     e = sys.exc_info()[1]
-                    if not (isinstance(e.args[0], _ElementInterface) and
-                            e.args[0].tag.endswith('Error') and
+                    if not (e.args[0].tag.endswith('Error') and
                             e.args[0].get('minorErrorCode') == 'ACCESS_TO_RESOURCE_IS_FORBIDDEN'):
                         raise
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/5926d03e/libcloud/test/compute/test_vcloud.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_vcloud.py b/libcloud/test/compute/test_vcloud.py
index 87324bd..aa9cf65 100644
--- a/libcloud/test/compute/test_vcloud.py
+++ b/libcloud/test/compute/test_vcloud.py
@@ -412,7 +412,7 @@ class AnotherErrorMember(Exception):
         self.tag = 'Error'
 
     def get(self, foo):
-        return 'ACCESS_TO_RESOURCE_IS_FORBIDDEN'
+        return 'ACCESS_TO_RESOURCE_IS_FORBIDDEN_1'
 
 class AnotherError(Exception):
     pass