Commit fde9020d authored by Andreas Jung's avatar Andreas Jung

Collector #2380: fixed regular expression in Converters.py

producing trash Control-M characters
parent 74f99d25
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
# attributions are listed in the accompanying credits file. # attributions are listed in the accompanying credits file.
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.11 $'[11:-2] __version__='$Revision: 1.12 $'[11:-2]
import re import re
from string import atoi, atol, atof, join, split, strip from string import atoi, atol, atof, join, split, strip
...@@ -93,7 +93,7 @@ def field2string(v): ...@@ -93,7 +93,7 @@ def field2string(v):
else: v=str(v) else: v=str(v)
return v return v
def field2text(v, nl=re.compile('\r\n\|\n\r').search): def field2text(v, nl=re.compile('\r\n|\n\r').search):
if hasattr(v,'read'): v=v.read() if hasattr(v,'read'): v=v.read()
else: v=str(v) else: v=str(v)
mo = nl(v) mo = nl(v)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment