mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 22:31:25 -07:00
Fix undefined variables, basestring usage, and some associated python3 issues
This commit is contained in:
parent
9f7b0dfc30
commit
225fa5d092
84 changed files with 652 additions and 963 deletions
|
@ -22,7 +22,7 @@ __metaclass__ = type
|
|||
import yaml
|
||||
|
||||
from ansible.module_utils.six import text_type
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
|
||||
|
||||
class AnsibleBaseYAMLObject(object):
|
||||
|
@ -131,7 +131,7 @@ class AnsibleVaultEncryptedUnicode(yaml.YAMLObject, AnsibleBaseYAMLObject):
|
|||
return str(self.data)
|
||||
|
||||
def __unicode__(self):
|
||||
return unicode(self.data)
|
||||
return to_text(self.data, errors='surrogate_or_strict')
|
||||
|
||||
def encode(self, encoding=None, errors=None):
|
||||
return self.data.encode(encoding, errors)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue