소스 검색

Merge pull request #2106 from 6vision/fix_sensitive

Fix TypeError in config drag_sensitive function
master
vision GitHub 4 달 전
부모
커밋
3afd99da30
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      config.py

+ 2
- 2
config.py 파일 보기

@@ -242,7 +242,7 @@ def drag_sensitive(config):
conf_dict_copy = copy.deepcopy(conf_dict)
for key in conf_dict_copy:
if "key" in key or "secret" in key:
if isinstance(key, str):
if isinstance(conf_dict_copy[key], str):
conf_dict_copy[key] = conf_dict_copy[key][0:3] + "*" * 5 + conf_dict_copy[key][-3:]
return json.dumps(conf_dict_copy, indent=4)

@@ -250,7 +250,7 @@ def drag_sensitive(config):
config_copy = copy.deepcopy(config)
for key in config:
if "key" in key or "secret" in key:
if isinstance(key, str):
if isinstance(config_copy[key], str):
config_copy[key] = config_copy[key][0:3] + "*" * 5 + config_copy[key][-3:]
return config_copy
except Exception as e:


Loading…
취소
저장