From 298e63c78a1d46f365ca0bbd9bd6372ca1701454 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 10 Nov 2024 09:17:00 +0800 Subject: [PATCH] bugfix --- ahserver/auth_api.py | 4 +--- ahserver/globalEnv.py | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ahserver/auth_api.py b/ahserver/auth_api.py index c2ca1e1..6326fbb 100755 --- a/ahserver/auth_api.py +++ b/ahserver/auth_api.py @@ -163,9 +163,7 @@ class AuthAPI: return ret except Exception as e: t3 = time.time() - info(f'Exception=client({ip}) {user} access {path} cost {t3-t1}, ({t2-t1}), except={e}') - print(f'Exception=client({ip}) {user} access {path} cost {t3-t1}, ({t2-t1}), except={e}') - print_exc() + exception(f'Exception=client({ip}) {user} access {path} cost {t3-t1}, ({t2-t1}), except={e}') raise e if user is None: diff --git a/ahserver/globalEnv.py b/ahserver/globalEnv.py index 66abaaa..7e81afb 100755 --- a/ahserver/globalEnv.py +++ b/ahserver/globalEnv.py @@ -25,6 +25,7 @@ from appPublic.uniqueID import setNode,getID from appPublic.unicoding import unicoding,uDict,uObject from appPublic.Singleton import SingletonDecorator from appPublic.rc4 import password +from appPublic.registerfunction import RegisterFunction from sqlor.dbpools import DBPools,runSQL,runSQLPaging from sqlor.filter import DBFilter, default_filterjson @@ -206,6 +207,7 @@ def initEnv(): g.save_file = save_file g.realpath = realpath g.format_exc = format_exc + g.rfexe = RegisterFunction().exe def set_builtins(): all_builtins = [ i for i in dir(builtins) if not i.startswith('_')]