[Zope-Checkins] CVS: Zope/lib/python/DateTime - DateTime.py:1.78

Andreas Jung andreas@digicool.com
Mon, 11 Mar 2002 08:48:53 -0500


Update of /cvs-repository/Zope/lib/python/DateTime
In directory cvs.zope.org:/tmp/cvs-serv18573/lib/python/DateTime

Modified Files:
	DateTime.py 
Log Message:
      - Collector #279: changed exception handling for safegmtime() to
        provide a more intuitive traceback for operating systems with a 
        limited gmtime() implementations



=== Zope/lib/python/DateTime/DateTime.py 1.77 => 1.78 ===
     try:
         t_int = int(t)
-    except OverflowError:
+        return  gmtime(t_int)
+    except (IOError, OverflowError):
         raise 'TimeError', 'The time %f is beyond the range ' \
               'of this Python implementation.' % float(t)
-    rval = gmtime(t_int)
-    return rval
 
 def safelocaltime(t):
     '''localtime with a safety zone.'''