Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #382 from greenbone/mergify/bp/ospd-21.04/pr-380
Browse files Browse the repository at this point in the history
Improve log message. (bp #380)
  • Loading branch information
ArnoStiefvater authored Apr 1, 2021
2 parents 247021e + d275f99 commit 7719ff3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Initialize end_time with create_scan. [#354](https://github.com/greenbone/ospd/pull/354)
- Fix get_count_total(). Accept -1 value set by the server. [#355](https://github.com/greenbone/ospd/pull/355)
- Fix get_count_total(). Consider 0 value set by the server. [#366](https://github.com/greenbone/ospd/pull/366)
- Remove exclude hosts which do not belong to the target for the scan progress calculation. [#377](https://github.com/greenbone/ospd/pull/377)
- Remove exclude hosts which do not belong to the target for the scan progress calculation.
[#377](https://github.com/greenbone/ospd/pull/377)
[#380](https://github.com/greenbone/ospd/pull/380)

[20.8.2]: https://github.com/greenbone/ospd/compare/v20.8.1...ospd-20.08

Expand Down
8 changes: 3 additions & 5 deletions ospd/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,9 @@ def simplify_exclude_host_count(self, scan_id: str) -> int:

if invalid_exc_hosts > 0:
LOGGER.warning(
"Please check the excluded host list. It contains "
"hosts which do not belong to the target. %d hosts were "
"removed from the excluded host list. This warning can be "
"ignored if this was done on purpose.",
invalid_exc_hosts,
"Please check the excluded host list. It contains hosts which "
"do not belong to the target. This warning can be ignored if "
"this was done on purpose (e.g. to exclude specific hostname)."
)

# Set scan_info's excluded simplified to propagate excluded count
Expand Down
6 changes: 2 additions & 4 deletions tests/test_scan_and_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -1343,10 +1343,8 @@ def test_scan_invalid_excluded_hosts(self):

logging.Logger.warning.assert_called_with( # pylint: disable=no-member
"Please check the excluded host list. It contains hosts "
"which do not belong to the target. %d hosts were removed from "
"the excluded host list. This warning can be ignored if this "
"was done on purpose.",
254,
"which do not belong to the target. This warning can be ignored if "
"this was done on purpose (e.g. to exclude specific hostname)."
)

def test_get_scan_progress_xml(self):
Expand Down

0 comments on commit 7719ff3

Please sign in to comment.