Skip to content

Commit 0f407aa

Browse files
author
Richard Jones
committed
verbose output during import is optional now [SF#1475624]
1 parent a855728 commit 0f407aa

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Fixed:
1212
("content" and "type" properties are now automatically included in the
1313
FileClass schema where previously the "content" property was faked and
1414
"type" was optional)
15+
- verbose output during import is optional now (sf bug 1475624)
1516

1617

1718
2006-03-03 1.1.1

roundup/admin.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
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 $
2020

2121
'''Administration commands for maintaining Roundup trackers.
2222
'''
@@ -121,6 +121,8 @@ def usage(self, message=''):
121121
-S <string> -- when outputting lists of data, string-separate them
122122
-s -- when outputting lists of data, space-separate them.
123123
Same as '-S " "'.
124+
-V -- be verbose when importing
125+
-v -- report Roundup and Python versions (and quit)
124126
125127
Only one of -s, -c or -S can be specified.
126128
@@ -1159,6 +1161,7 @@ class colon_separated(csv.excel):
11591161
if file_props is None:
11601162
file_props = r
11611163
continue
1164+
11621165
sys.stdout.write('Importing %s - %d\r'%(classname, n))
11631166
sys.stdout.flush()
11641167

@@ -1412,31 +1415,34 @@ def main(self):
14121415
password = l[1]
14131416
self.separator = None
14141417
self.print_designator = 0
1418+
self.verbose = 0
14151419
for opt, arg in opts:
14161420
if opt == '-h':
14171421
self.usage()
14181422
return 0
1419-
if opt == '-v':
1423+
elif opt == '-v':
14201424
print '%s (python %s)'%(roundup_version, sys.version.split()[0])
14211425
return 0
1422-
if opt == '-i':
1426+
elif opt == '-V':
1427+
self.verbose = 1
1428+
elif opt == '-i':
14231429
self.tracker_home = arg
1424-
if opt == '-c':
1430+
elif opt == '-c':
14251431
if self.separator != None:
14261432
self.usage('Only one of -c, -S and -s may be specified')
14271433
return 1
14281434
self.separator = ','
1429-
if opt == '-S':
1435+
elif opt == '-S':
14301436
if self.separator != None:
14311437
self.usage('Only one of -c, -S and -s may be specified')
14321438
return 1
14331439
self.separator = arg
1434-
if opt == '-s':
1440+
elif opt == '-s':
14351441
if self.separator != None:
14361442
self.usage('Only one of -c, -S and -s may be specified')
14371443
return 1
14381444
self.separator = ' '
1439-
if opt == '-d':
1445+
elif opt == '-d':
14401446
self.print_designator = 1
14411447

14421448
# if no command - go interactive

0 commit comments

Comments
 (0)