mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-22 19:59:07 +00:00
[PR #11104/4171b8a9 backport][stable-12] replace batch of redundant to_native()/to_text() occurrences (#11138)
replace batch of redundant to_native()/to_text() occurrences (#11104)
* replace batch of redundant to_native()/to_text() occurrences
* add changelog frag
(cherry picked from commit 4171b8a9ab)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
50ae8fd7ae
commit
31f0087da9
6 changed files with 12 additions and 9 deletions
|
|
@ -219,7 +219,6 @@ import os
|
|||
import math
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
# These are the multiplicative suffixes understood (or returned) by dd and
|
||||
|
|
@ -453,7 +452,7 @@ def main():
|
|||
initial_filesize = current_size(args)
|
||||
size_descriptors = size_spec(args)
|
||||
except AssertionError as err:
|
||||
module.fail_json(msg=to_native(err))
|
||||
module.fail_json(msg=f"{err}")
|
||||
|
||||
expected_filesize = size_descriptors["bytes"]
|
||||
if initial_filesize:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue