diff idavoll/tap.py @ 42:7d088c61e131

Make choice of backend an option to mktap. This includes the database configuration.
author Ralph Meijer <ralphm@ik.nu>
date Sun, 31 Oct 2004 21:12:55 +0000
parents 4cc41776b7d7
children 66fac7cd9edc
line wrap: on
line diff
--- a/idavoll/tap.py	Sun Oct 31 21:11:03 2004 +0000
+++ b/idavoll/tap.py	Sun Oct 31 21:12:55 2004 +0000
@@ -8,8 +8,15 @@
 		('jid', None, 'pubsub'),
 		('secret', None, None),
 		('rhost', None, '127.0.0.1'),
-		('rport', None, '6000')
+		('rport', None, '6000'),
+		('backend', None, 'memory'),
+		('dbuser', None, ''),
+		('dbname', None, 'pubsub'),
 	]
+	
+	def postOptions(self):
+		if self['backend'] not in ['pgsql', 'memory']:
+			raise usage.UsageError, "Unknown backend!"
 
 def makeService(config):
 	return idavoll.makeService(config)