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:
parent
069b485b7e
commit
92f8bf7b6f
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/7821-mssql_script-py2.yml
Normal file
2
changelogs/fragments/7821-mssql_script-py2.yml
Normal 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)."
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue