Skip to content

Commit

Permalink
Exit the program if auth is unsuccessful
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatgoyal715 committed Oct 13, 2019
1 parent ad93021 commit 67c1250
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hsc/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ def main():

crawler = Crawler()
crawler.parse_script()
while(not crawler.authenticate()):
print('Auth was unsuccessful')
if not crawler.authenticate():
print('Auth was unsuccessful. Exiting the program')
exit(1)

limit = crawler.options.limit or crawler.total_submissions
offset = crawler.options.offset or 0
Expand Down

0 comments on commit 67c1250

Please sign in to comment.