Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Mapping via collections.abc #99

Merged
merged 3 commits into from
Feb 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
* Fixed wrong order of key and value for condition_data, event_data and
method_data dict parameters of `modify_alert` method.
* Ensure `modify_setting` value is Base64-encoded
* Address DeprecationWarning regarding `collections` module


# python-gvm 1.0.0.beta2 (04.12.2018)

Expand Down
4 changes: 2 additions & 2 deletions gvm/protocols/gmpv7.py
Original file line number Diff line number Diff line change
Expand Up @@ -1779,7 +1779,7 @@ def create_task(self, name, config_id, target_id, scanner_id, *,
cmd.add_element('observers', _to_comma_list(observers))

if preferences is not None:
if not isinstance(preferences, collections.Mapping):
if not isinstance(preferences, collections.abc.Mapping):
raise InvalidArgument(
'preferences argument must be a dict'
)
Expand Down Expand Up @@ -5021,7 +5021,7 @@ def modify_task(self, task_id, *, name=None, config_id=None, target_id=None,
cmd.add_element('observers', _to_comma_list(observers))

if preferences is not None:
if not isinstance(preferences, collections.Mapping):
if not isinstance(preferences, collections.abc.Mapping):
raise InvalidArgument(
'preferences argument must be a dict'
)
Expand Down