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

mssql_script: make module Python 2 compatible (#7821)

Make module Python 2 compatible.
This commit is contained in:
Felix Fontein 2024-01-18 07:12:50 +01:00 committed by GitHub
parent 069b485b7e
commit 92f8bf7b6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "mssql_script - make the module work with Python 2 (https://github.com/ansible-collections/community.general/issues/7818, https://github.com/ansible-collections/community.general/pull/7821)."

View file

@ -283,7 +283,7 @@ def run_module():
# Process the script into batches # Process the script into batches
queries = [] queries = []
current_batch = [] current_batch = []
for statement in script.splitlines(keepends=True): for statement in script.splitlines(True):
# Ignore the Byte Order Mark, if found # Ignore the Byte Order Mark, if found
if statement.strip() == '\uFEFF': if statement.strip() == '\uFEFF':
continue continue