captcher configparser error
This commit is contained in:
parent
53ecae953c
commit
ddfa0a8a5a
@ -24,13 +24,16 @@ def api_auth(user, passwd, host):
|
||||
def main():
|
||||
"""Main logic entrypoint"""
|
||||
|
||||
config_path = os.path.join(os.path.expanduser("~"), "config.ini")
|
||||
config = configparser.ConfigParser()
|
||||
config.read(config_path)
|
||||
try:
|
||||
config_path = os.path.join(os.path.expanduser("~"), "config.ini")
|
||||
config = configparser.ConfigParser()
|
||||
config.read(config_path)
|
||||
|
||||
API_HOST = config['API']['HOST']
|
||||
API_USER = config['API']['USER']
|
||||
PASSWORD = config['API']['PASSWORD']
|
||||
API_HOST = config['API']['HOST']
|
||||
API_USER = config['API']['USER']
|
||||
PASSWORD = config['API']['PASSWORD']
|
||||
except configparser.Error:
|
||||
return
|
||||
|
||||
auth_token = api_auth(API_USER, PASSWORD, API_HOST)
|
||||
print auth_token
|
||||
|
Reference in New Issue
Block a user