From 50d26f3ad429b30e7bf3c8ea70ba4539149059fc Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Tue, 5 Apr 2011 13:24:54 +0200 Subject: find the principal --- src/meetingtools/ac/api.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/meetingtools/ac/api.py b/src/meetingtools/ac/api.py index bebfa00..22470a2 100644 --- a/src/meetingtools/ac/api.py +++ b/src/meetingtools/ac/api.py @@ -39,7 +39,11 @@ class ACPResult(): def get_principal(self): logger.debug(lxml.etree.tostring(self.et)) - return self.et.xpath('principal')[0] + pl = self.et.xpath('//principal') + if pl: + return pl[0] + else: + return None def _enc(v): ev = v -- cgit v1.1