Mercurial > p > roundup > code
comparison roundup/admin.py @ 763:a85919c54f3a
Removed prompt for admin email in initialisation.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 11 Jun 2002 06:41:50 +0000 |
| parents | eea38c039e90 |
| children | 6e6c63a57df9 |
comparison
equal
deleted
inserted
replaced
| 762:e13b9ba46d9d | 763:a85919c54f3a |
|---|---|
| 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 18 # | 18 # |
| 19 # $Id: admin.py,v 1.13 2002-05-30 23:58:14 richard Exp $ | 19 # $Id: admin.py,v 1.14 2002-06-11 06:41:50 richard Exp $ |
| 20 | 20 |
| 21 import sys, os, getpass, getopt, re, UserDict, shlex, shutil | 21 import sys, os, getpass, getopt, re, UserDict, shlex, shutil |
| 22 try: | 22 try: |
| 23 import csv | 23 import csv |
| 24 except ImportError: | 24 except ImportError: |
| 314 } | 314 } |
| 315 return 0 | 315 return 0 |
| 316 | 316 |
| 317 | 317 |
| 318 def do_initialise(self, instance_home, args): | 318 def do_initialise(self, instance_home, args): |
| 319 '''Usage: initialise [adminpw [adminemail]] | 319 '''Usage: initialise [adminpw] |
| 320 Initialise a new Roundup instance. | 320 Initialise a new Roundup instance. |
| 321 | 321 |
| 322 The administrator details will be set at this step. | 322 The administrator details will be set at this step. |
| 323 | 323 |
| 324 Execute the instance's initialisation function dbinit.init() | 324 Execute the instance's initialisation function dbinit.init() |
| 330 adminpw = '' | 330 adminpw = '' |
| 331 confirm = 'x' | 331 confirm = 'x' |
| 332 while adminpw != confirm: | 332 while adminpw != confirm: |
| 333 adminpw = getpass.getpass(_('Admin Password: ')) | 333 adminpw = getpass.getpass(_('Admin Password: ')) |
| 334 confirm = getpass.getpass(_(' Confirm: ')) | 334 confirm = getpass.getpass(_(' Confirm: ')) |
| 335 | |
| 336 # email | |
| 337 if len(args) > 2: | |
| 338 adminemail = args[2] | |
| 339 else: | |
| 340 adminemail = '' | |
| 341 while not adminemail: | |
| 342 adminemail = raw_input(_(' Admin Email: ')).strip() | |
| 343 | 335 |
| 344 # make sure the instance home is installed | 336 # make sure the instance home is installed |
| 345 if not os.path.exists(instance_home): | 337 if not os.path.exists(instance_home): |
| 346 raise UsageError, _('Instance home does not exist')%locals() | 338 raise UsageError, _('Instance home does not exist')%locals() |
| 347 if not os.path.exists(os.path.join(instance_home, 'html')): | 339 if not os.path.exists(os.path.join(instance_home, 'html')): |
| 1119 tool = AdminTool() | 1111 tool = AdminTool() |
| 1120 sys.exit(tool.main()) | 1112 sys.exit(tool.main()) |
| 1121 | 1113 |
| 1122 # | 1114 # |
| 1123 # $Log: not supported by cvs2svn $ | 1115 # $Log: not supported by cvs2svn $ |
| 1116 # Revision 1.13 2002/05/30 23:58:14 richard | |
| 1117 # oops | |
| 1118 # | |
| 1124 # Revision 1.12 2002/05/26 09:04:42 richard | 1119 # Revision 1.12 2002/05/26 09:04:42 richard |
| 1125 # out by one in the init args | 1120 # out by one in the init args |
| 1126 # | 1121 # |
| 1127 # Revision 1.11 2002/05/23 01:14:20 richard | 1122 # Revision 1.11 2002/05/23 01:14:20 richard |
| 1128 # . split instance initialisation into two steps, allowing config changes | 1123 # . split instance initialisation into two steps, allowing config changes |
