Maintain line counter
This commit is contained in:
parent
65cfabb53b
commit
274a128278
1 changed files with 6 additions and 2 deletions
|
@ -23,7 +23,11 @@ db = Database.connect(args.db)
|
|||
bucket = S3Bucket()
|
||||
archive = Archive(getattr(args, 'archive-dir'), bucket)
|
||||
|
||||
i = 0
|
||||
|
||||
for report in StormReport.each_from_csv_file(getattr(args, 'csv-report-details')):
|
||||
i += 1
|
||||
|
||||
if not report.is_radar_significant():
|
||||
continue
|
||||
|
||||
|
@ -36,9 +40,9 @@ for report in StormReport.each_from_csv_file(getattr(args, 'csv-report-details')
|
|||
else:
|
||||
if not args.quiet:
|
||||
if args.dry_run:
|
||||
print(f"Would archive {key}")
|
||||
print(f"Would archive {key} ({i})")
|
||||
else:
|
||||
print(f"Archiving {key}")
|
||||
print(f"Archiving {key} ({i})")
|
||||
|
||||
if not args.dry_run:
|
||||
archive.archive(key)
|
||||
|
|
Loading…
Add table
Reference in a new issue