Update of /cvsroot/jtoolkit/jToolkit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18361
Modified Files:
errors.py
Log Message:
added special handling of errortimetype for logaudit...
Index: errors.py
===================================================================
RCS file: /cvsroot/jtoolkit/jToolkit/errors.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** errors.py 10 Feb 2004 08:08:55 -0000 1.6
--- errors.py 10 Mar 2004 07:00:25 -0000 1.7
***************
*** 25,28 ****
--- 25,39 ----
import time
+ # pywintypes has an error in time formatting, so we need to be able to detect this type on windows
+ # (copied from data/dates.py)
+ try:
+ import pywintypes
+ errortimetype = pywintypes.TimEType
+ except ImportError:
+ errortimetype = None
+ except AttributeError:
+ # TODO: write an error message - this means that pywintypes needs to be patched for __file__ AttributeError
+ errortimetype = None
+
# TODO: add apache logging (into apache log files)
***************
*** 66,69 ****
--- 77,81 ----
def tounicode(value):
if type(value) == str: return value.decode('iso8859')
+ elif type(value) == errortimetype: return repr(value)
else: return unicode(value)
if recorddict is not None:
|