|
32 | 32 |
|
33 | 33 | secure = False |
34 | 34 |
|
35 | | -def fillInVars(obj): |
36 | | - if isinstance(obj, dict): |
37 | | - for key, value in obj.items(): |
38 | | - obj[key] = fillInVars(value) |
39 | | - elif isinstance(obj, list): |
40 | | - for i in range(len(obj)): |
41 | | - obj[i] = fillInVars(obj[i]) |
42 | | - elif isinstance(obj, str): |
43 | | - matches = re.findall(r"\${(.*?)}", obj) |
44 | | - for match in matches: |
45 | | - if match in VARIABLES: |
46 | | - value = VARIABLES[match] |
47 | | - |
48 | | - if isinstance(value, str): |
49 | | - newValue = obj.replace(f"${{{match}}}", str(value)) |
50 | | - return newValue |
51 | | - else: |
52 | | - return value |
| 35 | +def fillInVars(obj): |
| 36 | + if isinstance(obj, dict): |
| 37 | + for key, value in obj.items(): |
| 38 | + obj[key] = fillInVars(value) |
| 39 | + elif isinstance(obj, list): |
| 40 | + for i in range(len(obj)): |
| 41 | + obj[i] = fillInVars(obj[i]) |
| 42 | + elif isinstance(obj, str): |
| 43 | + matches = re.findall(r"\${(.*?)}", obj) |
| 44 | + for match in matches: |
| 45 | + if match in VARIABLES: |
| 46 | + value = VARIABLES[match] |
| 47 | + |
| 48 | + if isinstance(value, str): |
| 49 | + newValue = obj.replace(f"${{{match}}}", str(value)) |
| 50 | + return newValue |
| 51 | + else: |
| 52 | + return value |
53 | 53 | return obj |
54 | 54 |
|
55 | 55 | def UnauthorizedResponse(prompt=None): |
|
0 commit comments