Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions irsdb/filing/management/commands/enter_yearly_submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ def handle(self, *args, **options):

local_file_path = os.path.join(INDEX_DIRECTORY, "index_%s.csv" % year)

print('Downloading index_%s.csv...' % year)
stream_download(irs_file_url, local_file_path)
print('Done!')
if os.path.isfile(local_file_path):
print('Found index_%s.csv...' % year)
else:
print('Downloading index_%s.csv...' % year)
stream_download(irs_file_url, local_file_path)
print('Done!')

print("Entering xml submissions from %s" % local_file_path)
fh = open(local_file_path, 'r')
Expand Down