Skip to content

Commit 9d8535e

Browse files
author
Richard Jones
committed
Made the "init" prompting more friendly.
1 parent 20701b5 commit 9d8535e

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

roundup-admin

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /usr/bin/python
2-
# $Id: roundup-admin,v 1.4 2001-07-29 07:01:39 richard Exp $
2+
# $Id: roundup-admin,v 1.5 2001-07-30 00:04:48 richard Exp $
33

44
import sys
55
if int(sys.version[0]) < 2:
@@ -144,12 +144,24 @@ def main():
144144
template = backend = ''
145145
while not instance_home:
146146
instance_home = raw_input('Enter instance home: ').strip()
147-
# TODO: list the templates
148-
while not template:
149-
template = raw_input('Select template: ').strip()
150-
# TODO: list the backends
151-
while not backend:
152-
backend = raw_input('Select backend: ').strip()
147+
148+
# select template
149+
import roundup.templates
150+
templates = roundup.templates.listTemplates()
151+
print 'Templates:', ', '.join(templates)
152+
template = ''
153+
while template not in templates:
154+
template = raw_input('Select template [classic]: ').strip()
155+
if not template:
156+
template = 'classic'
157+
158+
import roundup.backends
159+
backends = roundup.backends.__all__
160+
backend = ''
161+
while backend not in backends:
162+
backend = raw_input('Select backend [anydbm]: ').strip()
163+
if not backend:
164+
backend = 'anydbm'
153165
while adminpw != confirm:
154166
adminpw = getpass.getpass('Admin Password: ')
155167
confirm = getpass.getpass(' Confirm: ')
@@ -291,6 +303,9 @@ if __name__ == '__main__':
291303

292304
#
293305
# $Log: not supported by cvs2svn $
306+
# Revision 1.4 2001/07/29 07:01:39 richard
307+
# Added vim command to all source so that we don't get no steenkin' tabs :)
308+
#
294309
# Revision 1.3 2001/07/23 08:45:28 richard
295310
# ok, so now "./roundup-admin init" will ask questions in an attempt to get a
296311
# workable instance_home set up :)

0 commit comments

Comments
 (0)