mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
Change return code for KeyboardInterrupt
This commit is contained in:
@@ -283,7 +283,7 @@ docker run --rm -it -v $(pwd):/music ritiek/spotify-downloader -l ncs-releases.t
|
|||||||
- `0` - Success
|
- `0` - Success
|
||||||
- `1` - Unknown error
|
- `1` - Unknown error
|
||||||
- `2` - Command line error (e.g. invalid args)
|
- `2` - Command line error (e.g. invalid args)
|
||||||
- `-1` - KeyboardInterrupt
|
- `3` - `KeyboardInterrupt`
|
||||||
- `10` - Invalid playlist URL
|
- `10` - Invalid playlist URL
|
||||||
- `11` - Playlist not found
|
- `11` - Playlist not found
|
||||||
|
|
||||||
|
|||||||
@@ -475,8 +475,11 @@ if __name__ == '__main__':
|
|||||||
grab_album(album=args.album)
|
grab_album(album=args.album)
|
||||||
elif args.username:
|
elif args.username:
|
||||||
feed_playlist(username=args.username)
|
feed_playlist(username=args.username)
|
||||||
|
|
||||||
|
# Actually we don't necessarily need this, but yeah...
|
||||||
|
# Explicit is better than implicit!
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
except KeyboardInterrupt as e:
|
except KeyboardInterrupt as e:
|
||||||
log.exception(e)
|
log.exception(e)
|
||||||
sys.exit(-1)
|
sys.exit(3)
|
||||||
|
|||||||
Reference in New Issue
Block a user