This repository was archived by the owner on May 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ Reasons to use a configuration file:
211
211
212
212
- Convenience - Set-up the parameters for diffs that need to run often
213
213
214
- - Easier and more readible - You can define the database connection settings as config values, instead of in a URI.
214
+ - Easier and more readable - you can define the database connection settings as config values, instead of in a URI.
215
215
216
216
- Gives you fine-grained control over the settings switches, without requiring any Python code.
217
217
Original file line number Diff line number Diff line change
1
+ from copy import deepcopy
1
2
import sys
2
3
import time
3
4
import json
25
26
"-" : "red" ,
26
27
}
27
28
29
+ def _remove_passwords_in_dict (d : dict ):
30
+ for k , v in d .items ():
31
+ if k == 'password' :
32
+ d [k ] = '*' * len (v )
33
+ elif isinstance (v , dict ):
34
+ _remove_passwords_in_dict (v )
35
+
28
36
29
37
@click .command ()
30
38
@click .argument ("database1" , required = False )
@@ -110,6 +118,8 @@ def _main(
110
118
if debug :
111
119
logging .basicConfig (level = logging .DEBUG , format = LOG_FORMAT , datefmt = DATE_FORMAT )
112
120
if __conf__ :
121
+ __conf__ = deepcopy (__conf__ )
122
+ _remove_passwords_in_dict (__conf__ )
113
123
logging .debug (f"Applied run configuration: { __conf__ } " )
114
124
elif verbose :
115
125
logging .basicConfig (level = logging .INFO , format = LOG_FORMAT , datefmt = DATE_FORMAT )
You can’t perform that action at this time.
0 commit comments