File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
import json
2
2
import logging
3
3
import platform
4
+ from pprint import pformat
4
5
from socket import gethostname
5
6
from urllib .parse import urljoin
6
7
@@ -206,10 +207,10 @@ def load_control_config():
206
207
207
208
try :
208
209
unknown_variables = WormConfiguration .from_kv (reply .json ().get ("config" ))
209
- LOG .info (
210
- "New configuration was loaded from server: %r"
211
- % (WormConfiguration .hide_sensitive_info (WormConfiguration .as_dict ()),)
210
+ formatted_config = pformat (
211
+ WormConfiguration .hide_sensitive_info (WormConfiguration .as_dict ())
212
212
)
213
+ LOG .info (f"New configuration was loaded from server:\n { formatted_config } " )
213
214
except Exception as exc :
214
215
# we don't continue with default conf here because it might be dangerous
215
216
LOG .error (
Original file line number Diff line number Diff line change 6
6
import sys
7
7
import traceback
8
8
from multiprocessing import freeze_support
9
+ from pprint import pformat
9
10
10
11
# dummy import for pyinstaller
11
12
# noinspection PyUnresolvedReferences
@@ -76,10 +77,8 @@ def main():
76
77
"default" % (config_file ,)
77
78
)
78
79
79
- print (
80
- "Loaded Configuration: %r"
81
- % WormConfiguration .hide_sensitive_info (WormConfiguration .as_dict ())
82
- )
80
+ formatted_config = pformat (WormConfiguration .hide_sensitive_info (WormConfiguration .as_dict ()))
81
+ print (f"Loaded Configuration:\n { formatted_config } " )
83
82
84
83
# Make sure we're not in a machine that has the kill file
85
84
kill_path = (
You can’t perform that action at this time.
0 commit comments