From 7a9237b70773ffb0a50ffd4c9a12991ea83a0d91 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 15 Oct 2009 15:12:08 +0800 Subject: [PATCH] GuiBulkImport - make cli version print out import stats --- pyfpdb/GuiBulkImport.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyfpdb/GuiBulkImport.py b/pyfpdb/GuiBulkImport.py index de8580df..667e4d6c 100755 --- a/pyfpdb/GuiBulkImport.py +++ b/pyfpdb/GuiBulkImport.py @@ -337,8 +337,10 @@ def main(argv=None): importer.setThreads(-1) importer.addBulkImportImportFileOrDir(os.path.expanduser(options.filename), site=options.filtername) importer.setCallHud(False) - importer.runImport() + (stored, dups, partial, errs, ttime) = importer.runImport() importer.clearFileList() + print 'GuiBulkImport done: Stored: %d \tDuplicates: %d \tPartial: %d \tErrors: %d in %s seconds - %.0f/sec'\ + % (stored, dups, partial, errs, ttime, (stored+0.0) / ttime) if __name__ == '__main__':