summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0054/stanza.py
diff options
context:
space:
mode:
Diffstat (limited to 'slixmpp/plugins/xep_0054/stanza.py')
-rw-r--r--slixmpp/plugins/xep_0054/stanza.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/slixmpp/plugins/xep_0054/stanza.py b/slixmpp/plugins/xep_0054/stanza.py
index cdd6215e..13b36320 100644
--- a/slixmpp/plugins/xep_0054/stanza.py
+++ b/slixmpp/plugins/xep_0054/stanza.py
@@ -324,7 +324,10 @@ class Birthday(ElementBase):
def get_bday(self):
if not self.xml.text:
return None
- return xep_0082.parse(self.xml.text)
+ try:
+ return xep_0082.parse(self.xml.text)
+ except ValueError:
+ return self.xml.text
class Rev(ElementBase):
@@ -343,7 +346,10 @@ class Rev(ElementBase):
def get_rev(self):
if not self.xml.text:
return None
- return xep_0082.parse(self.xml.text)
+ try:
+ return xep_0082.parse(self.xml.text)
+ except ValueError:
+ return self.xml.text
class Title(ElementBase):
@@ -523,8 +529,11 @@ class TimeZone(ElementBase):
def get_tz(self):
if not self.xml.text:
return xep_0082.tzutc()
- time = xep_0082.parse('00:00:00%s' % self.xml.text)
- return time.tzinfo
+ try:
+ time = xep_0082.parse('00:00:00%s' % self.xml.text)
+ return time.tzinfo
+ except ValueError:
+ return self.xml.text
register_stanza_plugin(VCardTemp, Name)