Slight cleanups.

This commit is contained in:
Jeremy Fincher 2004-07-21 18:49:27 +00:00
parent a95f1bc28c
commit 70efdfbea1
2 changed files with 5 additions and 9 deletions

View File

@ -171,12 +171,9 @@ for (name, s) in registry._cache.iteritems():
registerNetwork(name)
class SpaceSeparatedSetOfChannels(registry.SeparatedListOf):
class SpaceSeparatedSetOfChannels(registry.SpaceSeparatedListOf):
List = ircutils.IrcSet
Value = ValidChannel
def splitter(self, s):
return s.split()
joiner = ' '.join
def removeChannel(self, channel):
removals = []

View File

@ -444,11 +444,13 @@ class SeparatedListOf(Value):
# config parser doesn't care about this space, we'll use it :)
return ' '
class SpaceSeparatedListOfStrings(SeparatedListOf):
Value = String
class SpaceSeparatedListOf(SeparatedListOf):
def splitter(self, s):
return s.split()
joiner = ' '.join
class SpaceSeparatedListOfStrings(SpaceSeparatedListOf):
Value = String
class CommaSeparatedListOfStrings(SeparatedListOf):
Value = String
@ -456,9 +458,6 @@ class CommaSeparatedListOfStrings(SeparatedListOf):
return re.split(r'\s*,\s*', s)
joiner = ', '.join
class CommaSeparatedSetOfStrings(CommaSeparatedListOfStrings):
List = sets.Set
if __name__ == '__main__':
#if 1: