mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Made sure we can normalize for OnlySomeStrings.
This commit is contained in:
parent
c97d3905c5
commit
46a3f07491
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user