1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 01:22:19 +03:00

Fix for first-time login

This commit is contained in:
Jonathan Harris 2017-06-16 23:46:53 +01:00
parent efc1cb33b6
commit cf9ff04082
2 changed files with 3 additions and 3 deletions

@ -84,9 +84,9 @@ try:
session = companion.Session()
if config.get('cmdrs'):
username = config.get('fdev_usernames')[0]
session.login(username, config.get_password(username), False)
session.login(username, config.get_password(username))
else: # <= 2.25 not yet migrated
session.login(config.get('username'), config.get('password'), False)
session.login(config.get('username'), config.get('password'))
querytime = int(time())
data = session.query()
config.set('querytime', querytime)

@ -191,7 +191,7 @@ class Session:
if platform=='win32' and getattr(sys, 'frozen', False):
os.environ['REQUESTS_CA_BUNDLE'] = join(dirname(sys.executable), 'cacert.pem')
def login(self, username, password, is_beta):
def login(self, username=None, password=None, is_beta=False):
if (not username or not password):
if not self.credentials:
raise CredentialsError()