mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-23 20:29:08 +00:00
[PR #11106/f785e9c7 backport][stable-12] replace batch of redundant to_native()/to_text() occurrences (#11140)
replace batch of redundant to_native()/to_text() occurrences (#11106)
* replace batch of redundant to_native()/to_text() occurrences
* add changelog frag
* snap sanity
* rolling back snap for now
* more cases in redhat_subscription
(cherry picked from commit f785e9c780)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
4b9ece4fbd
commit
619ea5b7b3
14 changed files with 47 additions and 45 deletions
|
|
@ -102,7 +102,6 @@ import os
|
|||
|
||||
from ansible_collections.community.general.plugins.module_utils import deps
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
with deps.declare("pycdlib"):
|
||||
import pycdlib
|
||||
|
|
@ -278,7 +277,7 @@ def iso_rebuild(module, src_iso, dest_iso, delete_files_list, add_files_list):
|
|||
|
||||
iso.write(dest_iso)
|
||||
except Exception as err:
|
||||
msg = f"Failed to rebuild ISO {src_iso} with error: {to_native(err)}"
|
||||
msg = f"Failed to rebuild ISO {src_iso} with error: {err}"
|
||||
module.fail_json(msg=msg)
|
||||
finally:
|
||||
if iso:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue