comparison roundup/admin.py @ 1563:e2a8ce4d2317

Class.find() may now find unset Links [SF#700620]
author Richard Jones <richard@users.sourceforge.net>
date Wed, 26 Mar 2003 10:44:05 +0000
parents ab2aa490d713
children 053065585406
comparison
equal deleted inserted replaced
1562:b975da59cd11 1563:e2a8ce4d2317
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.47 2003-03-23 09:37:20 richard Exp $ 19 # $Id: admin.py,v 1.48 2003-03-26 10:43:58 richard Exp $
20 20
21 '''Administration commands for maintaining Roundup trackers. 21 '''Administration commands for maintaining Roundup trackers.
22 ''' 22 '''
23 23
24 import sys, os, getpass, getopt, re, UserDict, shlex, shutil 24 import sys, os, getpass, getopt, re, UserDict, shlex, shutil
539 539
540 # if the value isn't a number, look up the linked class to get the 540 # if the value isn't a number, look up the linked class to get the
541 # number 541 # number
542 for propname, value in props.items(): 542 for propname, value in props.items():
543 num_re = re.compile('^\d+$') 543 num_re = re.compile('^\d+$')
544 if not num_re.match(value): 544 if value == '-1':
545 props[propname] = None
546 elif not num_re.match(value):
545 # get the property 547 # get the property
546 try: 548 try:
547 property = cl.properties[propname] 549 property = cl.properties[propname]
548 except KeyError: 550 except KeyError:
549 raise UsageError, _('%(classname)s has no property ' 551 raise UsageError, _('%(classname)s has no property '

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