cosmetic changes

This commit is contained in:
deflax 2016-05-26 00:56:14 +03:00
parent 5fad468ea3
commit ef8ddb0e17
2 changed files with 5 additions and 3 deletions

View file

@ -72,7 +72,9 @@ def checkin(clientid):
try: try:
clientsdb = readclientsdb() clientsdb = readclientsdb()
c_id = clientsdb[str(clientid)] c_id = clientsdb[str(clientid)]
ioconfig.logger.info('client[{}]> checked in'.format(c_id)) #c_id.pop('encpasswd')
email = c_id['email']
ioconfig.logger.info('client[{}]> {} active'.format(clientid, email))
return c_id return c_id
except: except:
ioconfig.logger.error('clients> user id: {} could not be checked.'.format(clientid)) ioconfig.logger.error('clients> user id: {} could not be checked.'.format(clientid))
@ -153,5 +155,5 @@ def writeclientsdb(clientsdb):
if __name__ == '__main__': if __name__ == '__main__':
setencpasswd('abc@xyz.com', 'todos') setencpasswd('a@b.c', '123456')

View file

@ -27,7 +27,7 @@ def welcome():
def selector(fn, req, vmid=0): def selector(fn, req, vmid=0):
""" try to exec commands """ """ try to exec commands """
json = req.context['doc'] json = req.context['doc']
print(json) #TODO: remove debug print #print(json) #TODO: remove debug print
apipass = json['apikey'] apipass = json['apikey']
if apipass != config.get('general', 'apipass'): if apipass != config.get('general', 'apipass'):
status = falcon.HTTP_403 status = falcon.HTTP_403