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/04/23 05:13:36 UTC

[2/3] libcloud git commit: abiquo.py: Apply lxml ElementTree import pattern properly

abiquo.py: Apply lxml ElementTree import pattern properly


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

Branch: refs/heads/trunk
Commit: 3a20e92cab01a7c6634067e589e980fd99dfe87f
Parents: e6a6676
Author: Peter Schmidt <pe...@peterjs.com>
Authored: Fri Apr 22 22:00:44 2016 +1000
Committer: anthony-shaw <an...@apache.org>
Committed: Sat Apr 23 13:13:17 2016 +1000

----------------------------------------------------------------------
 libcloud/compute/drivers/abiquo.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/3a20e92c/libcloud/compute/drivers/abiquo.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/abiquo.py b/libcloud/compute/drivers/abiquo.py
index fdcc59d..12097f3 100644
--- a/libcloud/compute/drivers/abiquo.py
+++ b/libcloud/compute/drivers/abiquo.py
@@ -20,7 +20,10 @@ This version is compatible with the following versions of Abiquo:
 
     * Abiquo 3.1 (http://wiki.abiquo.com/display/ABI31/The+Abiquo+API)
 """
-import xml.etree.ElementTree as ET
+try:
+    from lxml import etree as ET
+except ImportError:
+    from xml.etree import ElementTree as ET
 
 from libcloud.compute.base import NodeDriver, NodeSize
 from libcloud.compute.types import Provider, LibcloudError