[Checkins] SVN: Sandbox/J1m/pycon2011/dev/metarecipe/cmsappdbmetarecipe.py Compute index port from main port

Jim Fulton jim at zope.com
Sat Mar 12 08:40:11 EST 2011


Log message for revision 120886:
  Compute index port from main port
  

Changed:
  U   Sandbox/J1m/pycon2011/dev/metarecipe/cmsappdbmetarecipe.py

-=-
Modified: Sandbox/J1m/pycon2011/dev/metarecipe/cmsappdbmetarecipe.py
===================================================================
--- Sandbox/J1m/pycon2011/dev/metarecipe/cmsappdbmetarecipe.py	2011-03-12 08:09:10 UTC (rev 120885)
+++ Sandbox/J1m/pycon2011/dev/metarecipe/cmsappdbmetarecipe.py	2011-03-12 13:40:10 UTC (rev 120886)
@@ -16,7 +16,9 @@
                     user=options['user'],
                     )
 
-        ports = options['main-port'], options['index-port']
+        main_port = options['main-port']
+        index_port = options.get('index-port', str(int(main_port) + 1))
+        ports = main_port, index_port
         dbnames = 'main', 'index'
         servers = zip(dbnames, ports)
         for dbname, port in servers:



More information about the checkins mailing list