mirror of
https://github.com/instaloader/instaloader.git
synced 2024-11-20 01:02:30 +01:00
Catch KeyboardInterrupt when asking for password
This commit is contained in:
parent
0c7398882b
commit
dc1eb2b193
@ -196,7 +196,11 @@ def _main(instaloader: Instaloader, targetlist: List[str],
|
||||
print(err, file=sys.stderr)
|
||||
pass
|
||||
else:
|
||||
instaloader.interactive_login(username)
|
||||
try:
|
||||
instaloader.interactive_login(username)
|
||||
except KeyboardInterrupt:
|
||||
print("\nInterrupted by user.", file=sys.stderr)
|
||||
return ExitCode.USER_ABORTED
|
||||
instaloader.context.log("Logged in as %s." % username)
|
||||
# since 4.2.9 login is required for geotags
|
||||
if instaloader.download_geotags and not instaloader.context.is_logged_in:
|
||||
|
Loading…
Reference in New Issue
Block a user