File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 22thumbs.db
33venv
44.vscode
5- __pycache__
5+ __pycache__
6+ build
7+ dist
8+ github-sshkeys.spec
Original file line number Diff line number Diff line change 55import json
66import requests
77import pycheck
8+ import sys
89
910GITHUB_API = 'https://api.github.com'
1011
@@ -84,7 +85,7 @@ def main():
8485 # Exit if the user have no keys on his GitHub account
8586 if len (github_keys ) == 0 :
8687 git .logger .log ("You have no SSH keys saved on GitHub. Please save one and try again." )
87- exit (- 1 )
88+ sys . exit (- 1 )
8889
8990 # Ensure that ~/.ssh and ~/.ssh/authorized_keys exist
9091 ensure_authorized_keys_file (git .logger )
@@ -102,10 +103,10 @@ def main():
102103 authorized_keys .write (key ["key" ])
103104
104105 git .logger .log (str (new_keys_count ) + " new keys were added to " + str (SSH_AUTHORIZED_KEYS_FILE .resolve ()), True )
105- # Otherwise exit
106+ # Otherwise sys. exit
106107 else :
107108 git .logger .log ("No keys were found." )
108- exit (0 )
109+ sys . exit (0 )
109110
110111if __name__ == '__main__' :
111112 main ()
Original file line number Diff line number Diff line change 66 pass
77else :
88 print ("This script only works on python 3.6 and up." )
9- exit (- 1 )
9+ sys . exit (- 1 )
You can’t perform that action at this time.
0 commit comments