comparison roundup-admin @ 376:c6d6ea15068b

Should parse with python 1.5.2 now.
author Richard Jones <richard@users.sourceforge.net>
date Fri, 09 Nov 2001 01:25:40 +0000
parents 3b9410cb8b61
children 93dc08528ad9
comparison
equal deleted inserted replaced
375:2ff102523713 376:c6d6ea15068b
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.40 2001-11-08 04:42:00 richard Exp $ 19 # $Id: roundup-admin,v 1.41 2001-11-09 01:25:40 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)
316 propcl = self.db.getclass(propcl.classname) 316 propcl = self.db.getclass(propcl.classname)
317 value = propcl.lookup(value) 317 value = propcl.lookup(value)
318 318
319 # now do the find 319 # now do the find
320 if self.comma_sep: 320 if self.comma_sep:
321 print ','.join(cl.find(**{propname: value})) 321 print ','.join(apply(cl.find, (), {propname: value}))
322 else: 322 else:
323 print cl.find(**{propname: value}) 323 print apply(cl.find, (), {propname: value})
324 return 0 324 return 0
325 325
326 def do_specification(self, args): 326 def do_specification(self, args):
327 '''Usage: specification classname 327 '''Usage: specification classname
328 Show the properties for a classname. 328 Show the properties for a classname.
723 tool = AdminTool() 723 tool = AdminTool()
724 sys.exit(tool.main()) 724 sys.exit(tool.main())
725 725
726 # 726 #
727 # $Log: not supported by cvs2svn $ 727 # $Log: not supported by cvs2svn $
728 # Revision 1.40 2001/11/08 04:42:00 richard
729 # Expanded the already-abbreviated "initialise" and "specification" commands,
730 # and added a comment to the command help about the abbreviation.
731 #
728 # Revision 1.39 2001/11/08 04:29:59 richard 732 # Revision 1.39 2001/11/08 04:29:59 richard
729 # roundup-admin now accepts abbreviated commands (eg. l = li = lis = list) 733 # roundup-admin now accepts abbreviated commands (eg. l = li = lis = list)
730 # [thanks Engelbert Gruber for the inspiration] 734 # [thanks Engelbert Gruber for the inspiration]
731 # 735 #
732 # Revision 1.38 2001/11/05 23:45:40 richard 736 # Revision 1.38 2001/11/05 23:45:40 richard

Roundup Issue Tracker: http://roundup-tracker.org/