1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Save changes of special characters to rset, without that comparison rset.to_xml() == wanted_rset.to_xml() will fail if record contains * or @ characters.

This commit is contained in:
Marcin Stolarek 2015-11-13 11:32:10 +01:00 committed by Matt Clay
parent 3c7787c05c
commit d3029a6059

View file

@ -404,6 +404,8 @@ def main():
# tripping of things like * and @. # tripping of things like * and @.
decoded_name = rset.name.replace(r'\052', '*') decoded_name = rset.name.replace(r'\052', '*')
decoded_name = decoded_name.replace(r'\100', '@') decoded_name = decoded_name.replace(r'\100', '@')
#Need to save this changes in rset, because of comparing rset.to_xml() == wanted_rset.to_xml() in next block
rset.name = decoded_name
if rset.type == type_in and decoded_name.lower() == record_in.lower() and rset.identifier == str(identifier_in): if rset.type == type_in and decoded_name.lower() == record_in.lower() and rset.identifier == str(identifier_in):
found_record = True found_record = True