comparison roundup-admin @ 261:0ca5381a72b5

made do_get have the args in the correct order
author Richard Jones <richard@users.sourceforge.net>
date Mon, 01 Oct 2001 06:40:43 +0000
parents 96cdd8ef0581
children ab921dc53ccd
comparison
equal deleted inserted replaced
260:2099d0d052ed 261:0ca5381a72b5
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.18 2001-09-18 22:58:37 richard Exp $ 19 # $Id: roundup-admin,v 1.19 2001-10-01 06:40:43 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)
148 '''Usage: get property designator[,designator]* 148 '''Usage: get property designator[,designator]*
149 Get the given property of one or more designator(s). 149 Get the given property of one or more designator(s).
150 150
151 Retrieves the property value of the nodes specified by the designators. 151 Retrieves the property value of the nodes specified by the designators.
152 ''' 152 '''
153 designators = string.split(args[0], ',') 153 propname = args[0]
154 propname = args[1] 154 designators = string.split(args[1], ',')
155 # TODO: handle the -c option 155 # TODO: handle the -c option
156 for designator in designators: 156 for designator in designators:
157 classname, nodeid = roundupdb.splitDesignator(designator) 157 classname, nodeid = roundupdb.splitDesignator(designator)
158 print db.getclass(classname).get(nodeid, propname) 158 print db.getclass(classname).get(nodeid, propname)
159 return 0 159 return 0
426 if __name__ == '__main__': 426 if __name__ == '__main__':
427 sys.exit(main()) 427 sys.exit(main())
428 428
429 # 429 #
430 # $Log: not supported by cvs2svn $ 430 # $Log: not supported by cvs2svn $
431 # Revision 1.18 2001/09/18 22:58:37 richard
432 #
433 # Added some more help to roundu-admin
434 #
431 # Revision 1.17 2001/08/28 05:58:33 anthonybaxter 435 # Revision 1.17 2001/08/28 05:58:33 anthonybaxter
432 # added missing 'import' statements. 436 # added missing 'import' statements.
433 # 437 #
434 # Revision 1.16 2001/08/12 06:32:36 richard 438 # Revision 1.16 2001/08/12 06:32:36 richard
435 # using isinstance(blah, Foo) now instead of isFooType 439 # using isinstance(blah, Foo) now instead of isFooType

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