Commits

Sean Summers committed 3fd9a59

cosmetic updates

  • Participants
  • Parent commits 8070409

Comments (0)

Files changed (2)

 def path(classObject):
     ''' generate full class history '''
     c = getattr(classObject, 'genericClass', classObject)
-    while c.declaredFields if hasattr(c, 'declaredFields') else hasattr(c, 'storedFields'):
+    while getattr(c, 'declaredFields', getattr(c, 'storedFields', None)):
         yield c
         c = getattr(c, 'superclass', getattr(c, 'parentStoredClass', None))
 
         return toISO8601(o)
     raise TypeError(repr(o) + ' is not JSON serializable')
 
-def toISO8601(aDate):
-    c = java.util.GregorianCalendar.getInstance()
-    c.setTime(aDate)
-    return javax.xml.bind.DatatypeConverter.printDateTime(c)
+def toISO8601(javaDate):
+    cal = java.util.GregorianCalendar.getInstance()
+    cal.setTime(javaDate)
+    return javax.xml.bind.DatatypeConverter.printDateTime(cal)
 
-def fromISO8601(aDateISO8601String):
-    return javax.xml.bind.DatatypeConverter.parseDateTime(aDateISO8601String).getTime()
+def fromISO8601(ISO8601date):
+    return javax.xml.bind.DatatypeConverter.parseDateTime(ISO8601date).getTime()