Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change umask to protect settings file

  • Loading branch information...
commit 0990837c6b77c2dd46d0632c5ab585bc7fc2c5b3 1 parent 8d0204c
Jesse Peterson jessepeterson authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  phone
2  phone
View
@@ -50,12 +50,14 @@ def set_credentials():
while True:
secret = getpass.getpass("API Secret: ")
if len(secret.strip()):
+ umask = os.umask(066)
handle = open(SETTINGS, "w")
try:
settings = {"username": username, "secret": secret}
json.dump(settings, handle, indent=2)
except:
handle.close()
+ os.umask(umask)
return
run_file("http://notifo.com/user/settings")
Please sign in to comment.
Something went wrong with that request. Please try again.