mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-06 13:22:58 +00:00
Replace to_native with to_text. (#897)
This commit is contained in:
@@ -10,7 +10,7 @@ from __future__ import annotations
|
||||
import datetime
|
||||
import re
|
||||
|
||||
from ansible.module_utils.common.text.converters import to_native
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||
OpenSSLObjectError,
|
||||
)
|
||||
@@ -118,7 +118,7 @@ def get_relative_time_option(
|
||||
|
||||
The return value will be a datetime object.
|
||||
"""
|
||||
result = to_native(input_string)
|
||||
result = to_text(input_string)
|
||||
if result is None:
|
||||
raise OpenSSLObjectError(
|
||||
f'The timespec "{input_string}" for {input_name} is not valid'
|
||||
|
||||
Reference in New Issue
Block a user