Last active
December 19, 2015 13:29
-
-
Save rickcnagy/5962381 to your computer and use it in GitHub Desktop.
Read the passwords saved to disk in setup.py
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
class Passwords(object): | |
def __init__(self): | |
try: | |
passwords = cPickle.load(open("passwords.p")) | |
except (EOFError, IOError): | |
sys.exit("No password file (./passwords.p) found. Please run 'setup.py'.") | |
self.USERNAME = passwords['USERNAME'] | |
self.PASSWORD = passwords['PASSWORD'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment