diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2015-10-25 22:52:32 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2015-10-25 22:52:32 +0100 | 
| commit | fe86c9dda04a2580c8d28901d076a92229e8f34f (patch) | |
| tree | 7aface48ad9c0a474e83b62ee2ca17d96731ac4f | |
| parent | 9dbd5171b7e0ade34c7a21b986cd9715d4870be8 (diff) | |
| download | Ishtar-fe86c9dda04a2580c8d28901d076a92229e8f34f.tar.bz2 Ishtar-fe86c9dda04a2580c8d28901d076a92229e8f34f.zip | |
Imports: better string filtering
| -rw-r--r-- | ishtar_common/data_importer.py | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/ishtar_common/data_importer.py b/ishtar_common/data_importer.py index bb0343add..40356f519 100644 --- a/ishtar_common/data_importer.py +++ b/ishtar_common/data_importer.py @@ -155,9 +155,14 @@ class UnicodeFormater(Formater):      def format(self, value):          try: -            value = value.strip()              if type(value) != unicode:                  value = unicode(value.strip()) +            vals = [] +            for v in value.split(u'\n'): +                v = v.strip() +                if v: +                    vals.append(v) +            value = u"\n".join(vals)              if self.re_filter:                  m = self.re_filter.match(value)                  if m: | 
