Patch for --os-shell against Windows/MySQL where resulting \r caused trouble

This commit is contained in:
Miroslav Stampar
2016-07-15 11:56:51 +02:00
parent c200b2cb19
commit c10b2825d7
2 changed files with 8 additions and 2 deletions

View File

@@ -119,9 +119,15 @@ class Dump(object):
elif data is not None:
_ = getUnicode(data)
if _ and _[-1] == '\n':
if _.endswith("\r\n"):
_ = _[:-2]
elif _.endswith("\n"):
_ = _[:-1]
if _.strip(' '):
_ = _.strip(' ')
if "\n" in _:
self._write("%s:\n---\n%s\n---" % (header, _))
else: