Skip to content

Commit b9ab2e9

Browse files
committed
Replace space in error log file name of product and version
And remove some invalid option for pylint checker
1 parent a1fc373 commit b9ab2e9

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.pylintrc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ confidence=
2424
# --enable=similarities". If you want to run only the classes checker, but have
2525
# no Warning level messages displayed, use"--disable=all --enable=classes
2626
# --disable=W"
27-
enable=all,
28-
python3
27+
enable=all
2928
disable=I,
3029
R, # refactoring checks
3130
abstract-method, # nice to have
@@ -34,14 +33,14 @@ disable=I,
3433
bad-whitespace, # pep8, nice to have
3534
broad-except,
3635
comprehension-escape, # throws false positives on 1.9.0 (Fedora 29)
37-
deprecated-lambda, # nice to have
36+
; deprecated-lambda, # nice to have
3837
import-outside-toplevel,
3938
import-error, # requires to having all modules installed
4039
invalid-name,
4140
len-as-condition, # nice to have
4241
line-too-long, # pep8, should be enabled
4342
missing-docstring,
44-
misplaced-comparison-constant,
43+
; misplaced-comparison-constant,
4544
multiple-statements, # nice to have
4645
no-absolute-import, # it was required for py2
4746
no-init,
@@ -51,7 +50,7 @@ disable=I,
5150
old-division, # it was required for py2
5251
protected-access,
5352
redefined-outer-name, # nice to have
54-
relative-import, # nice to have
53+
; relative-import, # nice to have
5554
super-init-not-called, # nice to have
5655
superfluous-parens, # nice to have
5756
too-many-lines,

charon/utils/logs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ def set_logging(
8181

8282

8383
def set_log_file_handler(product: str, version: str, logger: logging):
84+
prd = product.replace(" ", "_")
85+
ver = version.replace(" ", "_")
8486
log_loc = os.getenv("ERROR_LOG_LOCATION")
85-
error_log = "".join([product, "-", version, ".", DEFAULT_ERRORS_LOG])
87+
error_log = "".join([prd, "-", ver, ".", DEFAULT_ERRORS_LOG])
8688
if log_loc:
8789
os.makedirs(log_loc, exist_ok=True)
8890
error_log = os.path.join(log_loc, error_log)

0 commit comments

Comments
 (0)