Skip to content

Commit

Permalink
append new reports
Browse files Browse the repository at this point in the history
  • Loading branch information
dwillis committed Dec 29, 2023
1 parent f6a0490 commit cf5f8f5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions wv-legislature/agency_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
writer.writerow(['agency', 'title', 'year', 'url'])
writer.writerows(new_reports)

with open("all_reports.csv", 'w') as csvfile:
writer = csv.writer(csvfile)
writer.writerow(['agency', 'title', 'year', 'url'])
writer.writerows(results)
if len(new_reports) > 0 :
with open("all_reports.csv", 'a') as csvfile:
writer = csv.writer(csvfile)
writer.writerow(['agency', 'title', 'year', 'url'])
writer.writerows(new_reports)

0 comments on commit cf5f8f5

Please sign in to comment.