Closed jaudriga closed 2 months ago
When running an Ansible Playbook that uses the IONOS Cloud Ansible module (ionoscloudsdk.ionoscloud.server), I encountered the following warning:
ionoscloudsdk.ionoscloud.server
/tmp/ansible_ionoscloudsdk.ionoscloud.server_payload_17tli3ut/ansible_ionoscloudsdk.ionoscloud.server_payload.zip/ansible_collections/ionoscloudsdk/ionoscloud/plugins/modules/server.py:588: SyntaxWarning: invalid escape sequence '\w'
This warning is caused by an invalid escape sequence in line 588 of the server.py file:
server.py
uuid_match = re.compile('[\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12}', re.I)
No warning. This might also cause some issues as it might affect the regex search (not sure which yet).
Nothing special
ionoscloudsdk.ionoscloud.cube_server
SyntaxWarning: invalid escape sequence '\w'
The warning can be resolved by prefixing the string on line 588 with r to create a raw string literal.
r
This change should eliminate the SyntaxWarning without affecting the functionality of the module.
SyntaxWarning
Hello, this should be fixed in the latest beta release, v7.5.0-beta.1, please let us know is the issue persists
Description
When running an Ansible Playbook that uses the IONOS Cloud Ansible module (
ionoscloudsdk.ionoscloud.server
), I encountered the following warning:This warning is caused by an invalid escape sequence in line 588 of the
server.py
file:Expected behavior
No warning. This might also cause some issues as it might affect the regex search (not sure which yet).
Environment
Configuration Files
Nothing special
How to Reproduce
ionoscloudsdk.ionoscloud.cube_server
module.SyntaxWarning: invalid escape sequence '\w'
is displayed in the output.Additional Notes
The warning can be resolved by prefixing the string on line 588 with
r
to create a raw string literal.This change should eliminate the
SyntaxWarning
without affecting the functionality of the module.