Update of /cvsroot/jtoolkit/jToolkit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18564
Modified Files:
errors.py
Log Message:
did another fix that really fixes the types problem...
Index: errors.py
===================================================================
RCS file: /cvsroot/jtoolkit/jToolkit/errors.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** errors.py 10 Mar 2004 07:00:25 -0000 1.7
--- errors.py 10 Mar 2004 07:01:19 -0000 1.8
***************
*** 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)
--- 25,28 ----
***************
*** 77,82 ****
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:
recordstr = ', '.join([key + ':' + tounicode(value) for key, value in recorddict.iteritems()])
--- 66,74 ----
def tounicode(value):
if type(value) == str: return value.decode('iso8859')
! else:
! try:
! return unicode(value)
! except ValueError:
! return unicode(repr(value))
if recorddict is not None:
recordstr = ', '.join([key + ':' + tounicode(value) for key, value in recorddict.iteritems()])
|