-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V4.0: Better wording on Youtube API Key Quota limits, handle SingInts (…
…#71) * add test, handle Youtube quota expiry better (#68) * add sigint handler to handle Ctrl+C better * major version bump due to Python version change (now needs 3.6+) * move sentry around so that github action doesn;t complain when trying to fetch version for publishing * move sentry around * oops, moved signal to wrong place
- Loading branch information
1 parent
c8451ac
commit 2e5b427
Showing
5 changed files
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import signal | ||
import sys | ||
|
||
def signal_handler(sig, frame): | ||
# Signal handler to handle SIGINT, usually when Ctrl+C is pressed.. or if SIGINT is sent. | ||
# Thanks to https://stackoverflow.com/a/1112350/92837 | ||
print('\nCaught interrupt(did you press Ctrl+C?), stopping spotify_dl') | ||
sys.exit(0) | ||
|
||
signal.signal(signal.SIGINT, signal_handler) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters