Mercurial > p > roundup > code
comparison roundup/admin.py @ 500:3df718d48a5d
Missing "self" in props_from_args
| author | Roche Compaan <rochecompaan@users.sourceforge.net> |
|---|---|
| date | Tue, 08 Jan 2002 05:26:32 +0000 |
| parents | 5db2dad23f09 |
| children | 1401596be460 |
comparison
equal
deleted
inserted
replaced
| 499:9ad589d0a60f | 500:3df718d48a5d |
|---|---|
| 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.2 2002-01-07 10:41:44 richard Exp $ | 19 # $Id: admin.py,v 1.3 2002-01-08 05:26:32 rochecompaan Exp $ |
| 20 | 20 |
| 21 import sys, os, getpass, getopt, re, UserDict, shlex | 21 import sys, os, getpass, getopt, re, UserDict, shlex |
| 22 try: | 22 try: |
| 23 import csv | 23 import csv |
| 24 except ImportError: | 24 except ImportError: |
| 69 try: | 69 try: |
| 70 return self.db.getclass(classname) | 70 return self.db.getclass(classname) |
| 71 except KeyError: | 71 except KeyError: |
| 72 raise UsageError, _('no such class "%(classname)s"')%locals() | 72 raise UsageError, _('no such class "%(classname)s"')%locals() |
| 73 | 73 |
| 74 def props_from_args(args, klass=None): | 74 def props_from_args(self, args, klass=None): |
| 75 props = {} | 75 props = {} |
| 76 for arg in args: | 76 for arg in args: |
| 77 if arg.find('=') == -1: | 77 if arg.find('=') == -1: |
| 78 raise UsageError, _('argument "%(arg)s" not propname=value')%locals() | 78 raise UsageError, _('argument "%(arg)s" not propname=value')%locals() |
| 79 try: | 79 try: |
| 993 tool = AdminTool() | 993 tool = AdminTool() |
| 994 sys.exit(tool.main()) | 994 sys.exit(tool.main()) |
| 995 | 995 |
| 996 # | 996 # |
| 997 # $Log: not supported by cvs2svn $ | 997 # $Log: not supported by cvs2svn $ |
| 998 # Revision 1.2 2002/01/07 10:41:44 richard | |
| 999 # #500140 ] AdminTool.get_class() returns nothing | |
| 1000 # | |
| 998 # Revision 1.1 2002/01/05 02:11:22 richard | 1001 # Revision 1.1 2002/01/05 02:11:22 richard |
| 999 # I18N'ed roundup admin - and split the code off into a module so it can be used | 1002 # I18N'ed roundup admin - and split the code off into a module so it can be used |
| 1000 # elsewhere. | 1003 # elsewhere. |
| 1001 # Big issue with this is the doc strings - that's the help. We're probably going to | 1004 # Big issue with this is the doc strings - that's the help. We're probably going to |
| 1002 # have to switch to not use docstrings, which will suck a little :( | 1005 # have to switch to not use docstrings, which will suck a little :( |
