minor logging tweaks

This commit is contained in:
Izalia Mae 2020-02-26 14:38:15 -05:00
parent 70719fd091
commit 96f324cece
3 changed files with 4 additions and 4 deletions

View file

@ -5,6 +5,8 @@ from os.path import abspath, dirname, basename, isdir, isfile
from envbash import load_envbash
from .log import logging
pyv = sys.version_info
version = '0.9.1'
@ -42,7 +44,7 @@ if isfile(envfile):
load_envbash(envfile)
else:
print(f'Cannot find config file. Creating one at {envfile}')
logging.warning(f'Cannot find config file. Creating one at {envfile}')
ranchars = ''.join(random.choices(string.ascii_letters + string.digits, k=12))
newenv = f'''# Uncia DB Config
#DBHOST=localhost

View file

@ -190,7 +190,7 @@ def token(data, *args, db=None, **kwargs):
return
else:
logging.warning(f'Invalid data type: {type(data)}')
logging.verbose(f'Unhandled data type for get.token: {type(data)}')
return
return query('tokens', query_string)

View file

@ -382,8 +382,6 @@ class Login(HTTPMethodView):
if not tokendata:
return await self.get(request, msg='Failed to create token')
print(tokendata)
resp = response.redirect('/admin')
resp.cookies['token'] = tokendata['token']
resp.cookies['token']['domain'] = host