Skip to content

Commit

Permalink
mssql_script: make module Python 2 compatible (#7821)
Browse files Browse the repository at this point in the history
Make module Python 2 compatible.
  • Loading branch information
felixfontein authored Jan 18, 2024
1 parent 069b485 commit 92f8bf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/7821-mssql_script-py2.yml
Original file line number Diff line number Diff line change
@@ -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)."
2 changes: 1 addition & 1 deletion plugins/modules/mssql_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def run_module():
# Process the script into batches
queries = []
current_batch = []
for statement in script.splitlines(keepends=True):
for statement in script.splitlines(True):
# Ignore the Byte Order Mark, if found
if statement.strip() == '\uFEFF':
continue
Expand Down

0 comments on commit 92f8bf7

Please sign in to comment.