summaryrefslogtreecommitdiff
path: root/meetingtools/apps
diff options
context:
space:
mode:
authorJohan Lundberg <lundberg@nordu.net>2014-03-28 14:48:30 +0100
committerJohan Lundberg <lundberg@nordu.net>2014-03-28 14:48:30 +0100
commitb143524a6290ad4e52388cbb55ee4d7ec871264d (patch)
tree47a435d9ef6863b6a23ad65c0afa1d465efbe15f /meetingtools/apps
parent048d6f958c6b129a8c7a966082dc11b17d865952 (diff)
Future proofed et.element check.
Diffstat (limited to 'meetingtools/apps')
-rw-r--r--meetingtools/apps/content/tasks.py2
-rw-r--r--meetingtools/apps/room/tasks.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/meetingtools/apps/content/tasks.py b/meetingtools/apps/content/tasks.py
index 7b78164..723db0c 100644
--- a/meetingtools/apps/content/tasks.py
+++ b/meetingtools/apps/content/tasks.py
@@ -23,7 +23,7 @@ def get_owner(api, acc, sco):
return None
parent = r.et.xpath("//sco")[0]
- if parent:
+ if parent is not None:
if parent.findtext('name') in default_folders:
owner = {
'name': sco.findtext('name'),
diff --git a/meetingtools/apps/room/tasks.py b/meetingtools/apps/room/tasks.py
index c8a1fac..5f70b01 100644
--- a/meetingtools/apps/room/tasks.py
+++ b/meetingtools/apps/room/tasks.py
@@ -43,7 +43,7 @@ def _owner_username(api,acc,sco):
parent = r.et.xpath("//sco")[0]
logging.debug("p %s",repr(parent))
logging.debug("r %s",etree.tostring(parent))
- if parent:
+ if parent is not None:
logging.debug("parent: %s" % parent)
if parent.findtext('name') == 'User Meetings':
name = sco.findtext('name')