Commits

shaung committed d35d3f9 Draft

Ignore invalid date, time as well as datetime.

  • Participants
  • Parent commits 0add927

Comments (0)

Files changed (1)

File suds/xsd/sxbuiltin.py

     def translate(self, value, topython=True):
         if topython:
             if isinstance(value, basestring) and len(value):
-                return Date(value).date
+                try:
+                    return Date(value).date
+                except:
+                    return value
             else:
                 return None
         else:
     def translate(self, value, topython=True):
         if topython:
             if isinstance(value, basestring) and len(value):
-                return Time(value).time
+                try:
+                    return Time(value).time
+                except:
+                    return value
             else:
                 return None
         else: