Skip to content

Commit 143e5cd

Browse files
author
Richard Jones
committed
out by one in the init args
1 parent 0f71bfc commit 143e5cd

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

roundup/admin.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: admin.py,v 1.11 2002-05-23 01:14:20 richard Exp $
19+
# $Id: admin.py,v 1.12 2002-05-26 09:04:42 richard Exp $
2020

2121
import sys, os, getpass, getopt, re, UserDict, shlex, shutil
2222
try:
@@ -324,8 +324,9 @@ def do_initialise(self, instance_home, args):
324324
Execute the instance's initialisation function dbinit.init()
325325
'''
326326
# password
327-
if len(args) > 0:
328-
adminpw = args[0]
327+
print args
328+
if len(args) > 1:
329+
adminpw = args[1]
329330
else:
330331
adminpw = ''
331332
confirm = 'x'
@@ -334,8 +335,8 @@ def do_initialise(self, instance_home, args):
334335
confirm = getpass.getpass(_(' Confirm: '))
335336

336337
# email
337-
if len(args) > 1:
338-
adminemail = args[1]
338+
if len(args) > 2:
339+
adminemail = args[2]
339340
else:
340341
adminemail = ''
341342
while not adminemail:
@@ -494,9 +495,6 @@ def do_find(self, args):
494495
except TypeError:
495496
raise UsageError, _('%(classname)s has no key property"')%{
496497
'classname': link_class.classname}
497-
except KeyError:
498-
raise UsageError, _('%(classname)s has no entry "%(propname)s"')%{
499-
'classname': link_class.classname, 'propname': propname}
500498

501499
# now do the find
502500
try:
@@ -1124,6 +1122,10 @@ def main(self):
11241122

11251123
#
11261124
# $Log: not supported by cvs2svn $
1125+
# Revision 1.11 2002/05/23 01:14:20 richard
1126+
# . split instance initialisation into two steps, allowing config changes
1127+
# before the database is initialised.
1128+
#
11271129
# Revision 1.10 2002/04/27 10:07:23 richard
11281130
# minor fix to error message
11291131
#

0 commit comments

Comments
 (0)