Mercurial > p > roundup > code
comparison roundup-admin @ 274:79226fbb7741
Spit out command help if roundup-admin command doesn't get an argument.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 09 Oct 2001 23:36:25 +0000 |
| parents | a4241ddd22d7 |
| children | a5dabf2430c5 |
comparison
equal
deleted
inserted
replaced
| 273:45e32247aa33 | 274:79226fbb7741 |
|---|---|
| 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: roundup-admin,v 1.22 2001-10-09 07:25:59 richard Exp $ | 19 # $Id: roundup-admin,v 1.23 2001-10-09 23:36:25 richard Exp $ |
| 20 | 20 |
| 21 import sys | 21 import sys |
| 22 if int(sys.version[0]) < 2: | 22 if int(sys.version[0]) < 2: |
| 23 print 'Roundup requires python 2.0 or later.' | 23 print 'Roundup requires python 2.0 or later.' |
| 24 sys.exit(1) | 24 sys.exit(1) |
| 424 | 424 |
| 425 # get the instance | 425 # get the instance |
| 426 instance = roundup.instance.open(instance_home) | 426 instance = roundup.instance.open(instance_home) |
| 427 db = instance.open('admin') | 427 db = instance.open('admin') |
| 428 | 428 |
| 429 if len(args) < 2: | |
| 430 print function.__doc__ | |
| 431 return 1 | |
| 432 | |
| 429 # do the command | 433 # do the command |
| 430 try: | 434 try: |
| 431 return function(db, args[1:]) | 435 return function(db, args[1:]) |
| 432 finally: | 436 finally: |
| 433 db.close() | 437 db.close() |
| 438 if __name__ == '__main__': | 442 if __name__ == '__main__': |
| 439 sys.exit(main()) | 443 sys.exit(main()) |
| 440 | 444 |
| 441 # | 445 # |
| 442 # $Log: not supported by cvs2svn $ | 446 # $Log: not supported by cvs2svn $ |
| 447 # Revision 1.22 2001/10/09 07:25:59 richard | |
| 448 # Added the Password property type. See "pydoc roundup.password" for | |
| 449 # implementation details. Have updated some of the documentation too. | |
| 450 # | |
| 443 # Revision 1.21 2001/10/05 02:23:24 richard | 451 # Revision 1.21 2001/10/05 02:23:24 richard |
| 444 # . roundup-admin create now prompts for property info if none is supplied | 452 # . roundup-admin create now prompts for property info if none is supplied |
| 445 # on the command-line. | 453 # on the command-line. |
| 446 # . hyperdb Class getprops() method may now return only the mutable | 454 # . hyperdb Class getprops() method may now return only the mutable |
| 447 # properties. | 455 # properties. |
