Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 17, 2024
1 parent d539545 commit c445a33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion changelogs/fragments/update_not_supported_exception.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
bugfixes:
- Fail the module execution gracefully with plugin support required message.
- Also guide user to open issue for respective platform.
- Also guide user to open issue for respective platform.
10 changes: 5 additions & 5 deletions plugins/modules/cli_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
RETURN = """
"""

from ansible.module_utils._text import to_text
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.connection import Connection
from ansible.module_utils._text import to_text


def validate_args(module, device_operations):
Expand Down Expand Up @@ -110,10 +110,10 @@ def main():
result = {"changed": False}
connection = Connection(module._socket_path)
try:
running = connection.restore(
filename=module.params["filename"],
path=module.params["path"],
)
running = connection.restore(
filename=module.params["filename"],
path=module.params["path"],
)
except Exception as exc:
msg = "This platform does not support restore_plugin.Please report an issue against this platform's cliconf plugin."
module.fail_json(msg, code=exc.code)
Expand Down

0 comments on commit c445a33

Please sign in to comment.