[prev in list] [next in list] [prev in thread] [next in thread]
List: zodb-checkins
Subject: [Zodb-checkins] CVS: Packages/SFTPGateway/src/ZConfig -
From: "Fred L. Drake\, Jr." <fred () zope ! com>
Date: 2003-12-29 20:44:15
[Download RAW message or body]
Update of /cvs-repository/Packages/SFTPGateway/src/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv11226
Modified Files:
datatypes.py
Log Message:
make the "identifier" datatype always convert values to 8-bit strings
=== Packages/SFTPGateway/src/ZConfig/datatypes.py 1.18 => 1.19 ===
--- Packages/SFTPGateway/src/ZConfig/datatypes.py:1.18 Sun Dec 28 20:13:48 2003
+++ Packages/SFTPGateway/src/ZConfig/datatypes.py Mon Dec 29 15:43:43 2003
@@ -22,8 +22,10 @@
unicode
except NameError:
StringTypes = type(''), type(unicode(''))
+ UnicodeType = StringTypes[1]
else:
StringTypes = type(''),
+ UnicodeType = None
try:
True
@@ -109,6 +111,12 @@
class IdentifierConversion(RegularExpressionConversion):
def __init__(self):
RegularExpressionConversion.__init__(self, "[_a-zA-Z][_a-zA-Z0-9]*")
+
+ def __call__(self, value):
+ value = RegularExpressionConversion.__call__(self, value)
+ if UnicodeType is not None and isinstance(value, UnicodeType):
+ value = value.encode("ascii")
+ return value
def integer(value):
_______________________________________________
Zodb-checkins mailing list
Zodb-checkins@zope.org
http://mail.zope.org/mailman/listinfo/zodb-checkins
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic