[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src GObjects.py GTypecast.py
From: |
Jason Cater |
Subject: |
gnue/common/src GObjects.py GTypecast.py |
Date: |
Thu, 27 Jun 2002 21:29:19 -0400 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Jason Cater <address@hidden> 02/06/27 21:29:19
Modified files:
common/src : GObjects.py GTypecast.py
Log message:
made the default attribute for boolean values be ="Y" or ="N" instead
of =""
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/GObjects.py.diff?cvsroot=OldCVS&tr1=1.36&tr2=1.37&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/common/src/GTypecast.py.diff?cvsroot=OldCVS&tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: gnue/common/src/GObjects.py
diff -c gnue/common/src/GObjects.py:1.36 gnue/common/src/GObjects.py:1.37
*** gnue/common/src/GObjects.py:1.36 Fri May 3 19:07:18 2002
--- gnue/common/src/GObjects.py Thu Jun 27 21:29:19 2002
***************
*** 18,24 ****
#
# Copyright 2000-2002 Free Software Foundation
#
- #
# FILE:
# GObjects.py
#
--- 18,23 ----
***************
*** 208,216 ****
typecast =
lookupDict[xmlEntity]['Attributes'][attribute]['Typecast']
except:
typecast = GTypecast.text
! if typecast == GTypecast.boolean \
! and val == 1:
! addl = ' %s=""' % (attribute)
elif typecast == GTypecast.names:
addl = ' %s="%s"' % \
(attribute, string.join(val,','))
--- 207,217 ----
typecast =
lookupDict[xmlEntity]['Attributes'][attribute]['Typecast']
except:
typecast = GTypecast.text
! if typecast == GTypecast.boolean:
! if val:
! addl = ' %s="Y"' % (attribute)
! else:
! addl = ' %s="N"' % (attribute)
elif typecast == GTypecast.names:
addl = ' %s="%s"' % \
(attribute, string.join(val,','))
Index: gnue/common/src/GTypecast.py
diff -c gnue/common/src/GTypecast.py:1.5 gnue/common/src/GTypecast.py:1.6
*** gnue/common/src/GTypecast.py:1.5 Wed Jun 26 18:31:10 2002
--- gnue/common/src/GTypecast.py Thu Jun 27 21:29:19 2002
***************
*** 107,113 ****
rv = string.strip(value)
if len(rv):
! return not (string.lower(rv) in ('n','f','0'))
else:
# This may seem counter-intuitive, but if attribute was present
# without a specified value, then treat as true
--- 107,113 ----
rv = string.strip(value)
if len(rv):
! return not (rv[0] in ('N','n','F','f','0'))
else:
# This may seem counter-intuitive, but if attribute was present
# without a specified value, then treat as true
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/common/src GObjects.py GTypecast.py,
Jason Cater <=