ATM-lib-common

import logging.config
from conf import settings
from core import src


def get_logger(name):
logging.config.dictConfig(settings.LOGGING_DIC)
return logging.getLogger(name)


def login_auth(func):
def inner(*args, **kwargs):
if not src.user_data['name']:
src.login()
else:
return func(*args, **kwargs)

return inner

猜你喜欢

转载自www.cnblogs.com/wangcheng9418/p/9221769.html
atm
lib