From b82635d292073910d58a0acc3e492204aa2c28ea Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 22 Feb 2021 17:30:11 +0530 Subject: [PATCH] Add noqa comment to ignore complexity of DumpSecrets.dump() --- .travis.yml | 2 +- monkey/infection_monkey/exploit/zerologon_utils/dump_secrets.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ff0fdd8c..26482dcd5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,7 +69,7 @@ script: ## Display the linter issues - cat ./ci_scripts/flake8_warnings.txt ## Make sure that we haven't increased the amount of warnings. -- PYTHON_WARNINGS_AMOUNT_UPPER_LIMIT=81 +- PYTHON_WARNINGS_AMOUNT_UPPER_LIMIT=80 - if [ $(tail -n 1 ./ci_scripts/flake8_warnings.txt) -gt $PYTHON_WARNINGS_AMOUNT_UPPER_LIMIT ]; then echo "Too many python linter warnings! Failing this build. Lower the amount of linter errors in this and try again. " && exit 1; fi ## Check import order diff --git a/monkey/infection_monkey/exploit/zerologon_utils/dump_secrets.py b/monkey/infection_monkey/exploit/zerologon_utils/dump_secrets.py index 524089338..b196528e7 100644 --- a/monkey/infection_monkey/exploit/zerologon_utils/dump_secrets.py +++ b/monkey/infection_monkey/exploit/zerologon_utils/dump_secrets.py @@ -105,7 +105,7 @@ class DumpSecrets: self.__nthash, ) - def dump(self): + def dump(self): # noqa: C901 with StdoutCapture() as output_captor: dumped_secrets = ""