Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.

Commit

Permalink
catch keyboard interupt and exit gacefully
Browse files Browse the repository at this point in the history
  • Loading branch information
cfbao committed Jul 21, 2017
1 parent 2676dc9 commit 31e808f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,4 +430,7 @@ def parse_time(rfc3339):
return calendar.timegm(time.strptime(time_str, '%Y-%m-%dT%H:%M:%S'))

if __name__ == '__main__':
main()
try:
main()
except KeyboardInterrupt:
print('\nStopped by user')

0 comments on commit 31e808f

Please sign in to comment.