diff options
-rw-r--r-- | src/meetingtools/ac/api.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 |