]> code.delx.au - pymsnt/commitdiff
If parsing of MSNOBJ fails, then don't throw an exception.
authorjamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>
Fri, 14 Jul 2006 06:48:08 +0000 (06:48 +0000)
committerjamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>
Fri, 14 Jul 2006 06:48:08 +0000 (06:48 +0000)
git-svn-id: http://delx.cjb.net/svn/pymsnt/trunk@194 55fbd22a-6204-0410-b2f0-b6c764c7e90a

committer: jamesbunton <jamesbunton@55fbd22a-6204-0410-b2f0-b6c764c7e90a>

src/tlib/msn/msn.py

index 13ec0916461127779ecc0b2c0642603dcc77797e..2bda133a69314e487a0c74398eca039825cc82d2 100644 (file)
@@ -526,6 +526,8 @@ class MSNObject:
     
     def parse(self, s):
         e = xmlw.parseText(s, True)
+        if not e:
+            return # Parse failed
         self.creator = e.getAttribute("Creator")
         self.size = int(e.getAttribute("Size"))
         self.type = int(e.getAttribute("Type"))