Fix a nasty test case which was failing under 3.3.
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 @@
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 @@
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
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 @@
self.tag = 'Error'
def get(self, foo):
- return 'ACCESS_TO_RESOURCE_IS_FORBIDDEN'
+ return 'ACCESS_TO_RESOURCE_IS_FORBIDDEN_1'
class AnotherError(Exception):
pass