Skip to content

Commit c6cc567

Browse files
author
Ralf Schlatterbeck
committed
Error message fixes.
- Verbose messages now print the \r *before* the message. Now if the import aborts (e.g. due to a traceback) the last message will not be overwritten (by the traceback). - fix duplicate verbose message, probably result of a merge.
1 parent afc7f43 commit c6cc567

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

roundup/admin.py

Lines changed: 3 additions & 6 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.105 2006-08-11 05:13:06 richard Exp $
19+
# $Id: admin.py,v 1.106 2007-01-10 18:17:47 schlatterbeck Exp $
2020

2121
'''Administration commands for maintaining Roundup trackers.
2222
'''
@@ -1110,10 +1110,7 @@ class colon_separated(csv.excel):
11101110
# all nodes for this class
11111111
for nodeid in cl.getnodeids():
11121112
if self.verbose:
1113-
sys.stdout.write('Exporting %s - %s\r'%(classname, nodeid))
1114-
sys.stdout.flush()
1115-
if self.verbose:
1116-
sys.stdout.write('Exporting %s - %s\r'%(classname, nodeid))
1113+
sys.stdout.write('\rExporting %s - %s'%(classname, nodeid))
11171114
sys.stdout.flush()
11181115
writer.writerow(cl.export_list(propnames, nodeid))
11191116
if export_files and hasattr(cl, 'export_files'):
@@ -1198,7 +1195,7 @@ class colon_separated(csv.excel):
11981195
continue
11991196

12001197
if self.verbose:
1201-
sys.stdout.write('Importing %s - %s\r'%(classname, n))
1198+
sys.stdout.write('\rImporting %s - %s'%(classname, n))
12021199
sys.stdout.flush()
12031200

12041201
# do the import and figure the current highest nodeid

0 commit comments

Comments
 (0)