Made sure we can normalize for OnlySomeStrings.

This commit is contained in:
Jeremy Fincher 2004-04-08 02:18:35 +00:00
parent c97d3905c5
commit 46a3f07491
1 changed files with 2 additions and 0 deletions

View File

@ -297,8 +297,10 @@ class String(Value):
raise InvalidRegistryValue, '%r is not a string.' % s
class OnlySomeStrings(String):
normalize = staticmethod(str.lower)
validStrings = ()
def setValue(self, s):
s = self.normalize(s)
if s in self.validStrings:
String.setValue(self, s)
else: