jumpserver/apps/common/local.py

14 lines
245 B
Python
Raw Normal View History

from werkzeug.local import Local
2019-06-25 06:32:25 +00:00
thread_local = Local()
encrypted_field_set = set()
2019-06-25 06:32:25 +00:00
def _find(attr):
return getattr(thread_local, attr, None)
def add_encrypted_field_set(label):
if label:
encrypted_field_set.add(str(label))