comparison idavoll/tap.py @ 156:6250905b72f6

Fix spacing errors. Do 0.5.0 release.
author Ralph Meijer <ralphm@ik.nu>
date Mon, 28 Aug 2006 12:44:20 +0000
parents 5191ba7c4df8
children 1701c0e2c707
comparison
equal deleted inserted replaced
155:5191ba7c4df8 156:6250905b72f6
5 from twisted.internet import interfaces 5 from twisted.internet import interfaces
6 from twisted.python import usage 6 from twisted.python import usage
7 import idavoll 7 import idavoll
8 8
9 class Options(usage.Options): 9 class Options(usage.Options):
10 optParameters = [ 10 optParameters = [
11 ('jid', None, 'pubsub'), 11 ('jid', None, 'pubsub'),
12 ('secret', None, 'secret'), 12 ('secret', None, 'secret'),
13 ('rhost', None, '127.0.0.1'), 13 ('rhost', None, '127.0.0.1'),
14 ('rport', None, '5347'), 14 ('rport', None, '5347'),
15 ('backend', None, 'memory'), 15 ('backend', None, 'memory'),
16 ('dbuser', None, ''), 16 ('dbuser', None, ''),
17 ('dbname', None, 'pubsub'), 17 ('dbname', None, 'pubsub'),
18 ] 18 ]
19 19
20 optFlags = [ 20 optFlags = [
21 ('verbose', 'v', 'Show traffic'), 21 ('verbose', 'v', 'Show traffic'),
22 ('hide-nodes', None, 'Hide all nodes for disco') 22 ('hide-nodes', None, 'Hide all nodes for disco')
23 ] 23 ]
24 24
25 def postOptions(self): 25 def postOptions(self):
26 if self['backend'] not in ['pgsql', 'memory']: 26 if self['backend'] not in ['pgsql', 'memory']:
27 raise usage.UsageError, "Unknown backend!" 27 raise usage.UsageError, "Unknown backend!"
28 28
29 def makeService(config): 29 def makeService(config):
30 return idavoll.makeService(config) 30 return idavoll.makeService(config)