From 080e4984aa5417759741df73ff68293992e1956e Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Sun, 5 Jun 2011 12:47:45 +0200 Subject: [PATCH] Don't use isinstance(root, ET.Element) as ET.Element is a function in Python 2.6 --- radicale/xmlutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radicale/xmlutils.py b/radicale/xmlutils.py index 9ab2f67d..f02175b6 100644 --- a/radicale/xmlutils.py +++ b/radicale/xmlutils.py @@ -126,7 +126,7 @@ def name_from_path(path, calendar): def props_from_request(root, actions=("set", "remove")): """Return a list of properties as a dictionary.""" result = OrderedDict() - if not isinstance(root, ET.Element): + if not hasattr(root, "tag"): root = ET.fromstring(root.encode("utf8")) for action in actions: