Skip to content

Commit

Permalink
Fix an issue where validate spammed logs when running. (#4203)
Browse files Browse the repository at this point in the history
* fix

* update changelog

* Update demisto_sdk/__main__.py

Co-authored-by: Judah Schwartz <JudahSchwartz@users.noreply.github.com>

* Update demisto_sdk/__main__.py

Co-authored-by: Judah Schwartz <JudahSchwartz@users.noreply.github.com>

---------

Co-authored-by: Judah Schwartz <JudahSchwartz@users.noreply.github.com>
  • Loading branch information
YuvHayun and JudahSchwartz committed Apr 2, 2024
1 parent dfc4a0c commit 44b4997
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .changelog/4203.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Fixed an issue where validate spammed logs when running.
type: fix
pr_number: 4203
6 changes: 3 additions & 3 deletions demisto_sdk/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,11 +839,11 @@ def validate(ctx, config, file_paths: str, **kwargs):
"config_path",
"category_to_run",
]:
if new_validate_flag in kwargs:
if kwargs.get(new_validate_flag):
logger.warning(
f"The following flag {new_validate_flag.replace('_', '-')} is related only to the new validate and is being called while not running the new validate flow, therefore the flag will be ignored."
)
if run_old_validate:
if not run_old_validate:
for old_validate_flag in [
"no_backward_comp",
"no_conf_json",
Expand All @@ -865,7 +865,7 @@ def validate(ctx, config, file_paths: str, **kwargs):
"run_specific_validations",
"no_multiprocessing",
]:
if old_validate_flag in kwargs:
if kwargs.get(old_validate_flag):
logger.warning(
f"The following flag {old_validate_flag.replace('_', '-')} is related only to the old validate and is being called while not running the old validate flow, therefore the flag will be ignored."
)
Expand Down

0 comments on commit 44b4997

Please sign in to comment.