|
16 | 16 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
17 | 17 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
18 | 18 | # |
19 | | -# $Id: admin.py,v 1.98 2006-02-06 21:00:44 richard Exp $ |
| 19 | +# $Id: admin.py,v 1.99 2006-04-27 03:38:53 richard Exp $ |
20 | 20 |
|
21 | 21 | '''Administration commands for maintaining Roundup trackers. |
22 | 22 | ''' |
@@ -121,6 +121,8 @@ def usage(self, message=''): |
121 | 121 | -S <string> -- when outputting lists of data, string-separate them |
122 | 122 | -s -- when outputting lists of data, space-separate them. |
123 | 123 | Same as '-S " "'. |
| 124 | + -V -- be verbose when importing |
| 125 | + -v -- report Roundup and Python versions (and quit) |
124 | 126 |
|
125 | 127 | Only one of -s, -c or -S can be specified. |
126 | 128 |
|
@@ -1159,6 +1161,7 @@ class colon_separated(csv.excel): |
1159 | 1161 | if file_props is None: |
1160 | 1162 | file_props = r |
1161 | 1163 | continue |
| 1164 | + |
1162 | 1165 | sys.stdout.write('Importing %s - %d\r'%(classname, n)) |
1163 | 1166 | sys.stdout.flush() |
1164 | 1167 |
|
@@ -1412,31 +1415,34 @@ def main(self): |
1412 | 1415 | password = l[1] |
1413 | 1416 | self.separator = None |
1414 | 1417 | self.print_designator = 0 |
| 1418 | + self.verbose = 0 |
1415 | 1419 | for opt, arg in opts: |
1416 | 1420 | if opt == '-h': |
1417 | 1421 | self.usage() |
1418 | 1422 | return 0 |
1419 | | - if opt == '-v': |
| 1423 | + elif opt == '-v': |
1420 | 1424 | print '%s (python %s)'%(roundup_version, sys.version.split()[0]) |
1421 | 1425 | return 0 |
1422 | | - if opt == '-i': |
| 1426 | + elif opt == '-V': |
| 1427 | + self.verbose = 1 |
| 1428 | + elif opt == '-i': |
1423 | 1429 | self.tracker_home = arg |
1424 | | - if opt == '-c': |
| 1430 | + elif opt == '-c': |
1425 | 1431 | if self.separator != None: |
1426 | 1432 | self.usage('Only one of -c, -S and -s may be specified') |
1427 | 1433 | return 1 |
1428 | 1434 | self.separator = ',' |
1429 | | - if opt == '-S': |
| 1435 | + elif opt == '-S': |
1430 | 1436 | if self.separator != None: |
1431 | 1437 | self.usage('Only one of -c, -S and -s may be specified') |
1432 | 1438 | return 1 |
1433 | 1439 | self.separator = arg |
1434 | | - if opt == '-s': |
| 1440 | + elif opt == '-s': |
1435 | 1441 | if self.separator != None: |
1436 | 1442 | self.usage('Only one of -c, -S and -s may be specified') |
1437 | 1443 | return 1 |
1438 | 1444 | self.separator = ' ' |
1439 | | - if opt == '-d': |
| 1445 | + elif opt == '-d': |
1440 | 1446 | self.print_designator = 1 |
1441 | 1447 |
|
1442 | 1448 | # if no command - go interactive |
|
0 commit comments