From: alexander s. <a1...@us...> - 2009-05-26 05:16:58
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5764 Modified Files: fields.py Log Message: DbfNumericFieldDef.decodeValue: strip zero bytes Index: fields.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/fields.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** fields.py 5 Feb 2009 05:31:57 -0000 1.13 --- fields.py 26 May 2009 05:16:51 -0000 1.14 *************** *** 5,8 **** --- 5,9 ---- """ """History (most recent first): + 26-may-2009 [als] DbfNumericFieldDef.decodeValue: strip zero bytes 05-feb-2009 [als] DbfDateFieldDef.encodeValue: empty arg produces empty date 16-sep-2008 [als] DbfNumericFieldDef decoding looks for decimal point *************** *** 235,243 **** """ ! value = value.strip() if "." in value: # a float (has decimal separator) return float(value) ! elif value and value.strip(): # must be an integer return int(value) --- 236,244 ---- """ ! value = value.strip(" \0") if "." in value: # a float (has decimal separator) return float(value) ! elif value: # must be an integer return int(value) |