cosmetic changes

This commit is contained in:
deflax 2016-05-23 23:52:27 +03:00
parent 9e47e8498f
commit 5fad468ea3

View file

@ -72,6 +72,7 @@ def checkin(clientid):
try:
clientsdb = readclientsdb()
c_id = clientsdb[str(clientid)]
ioconfig.logger.info('client[{}]> checked in'.format(c_id))
return c_id
except:
ioconfig.logger.error('clients> user id: {} could not be checked.'.format(clientid))
@ -85,7 +86,6 @@ def validate(clientemail, password):
clientsdb = readclientsdb()
path = utils.get_path(clientsdb, clientemail)
c_id = str(path[0])
#ioconfig.logger.info('client[{}]> path={}'.format(c_id, str(path)))
except:
ioconfig.logger.error('clients> {} was not found in the database!'.format(clientemail))
#log bad ips here...
@ -103,7 +103,7 @@ def validate(clientemail, password):
#3. generate vmlist to return the owned ids to the client.
return clientvms(clientsdb[c_id])
else:
ioconfig.logger.warning('clients> {} access denied!'.format(clientemail))
ioconfig.logger.warning('client[{}]> {} access denied!'.format(c_id, clientemail))
#cant compare password
#TODO: Log attempts and block.
return None