mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-27 16:46:42 -06:00
Add backslash escape support for cvs reader
This commit is contained in:
parent
4c1bfdb919
commit
032b77ac23
@ -1404,7 +1404,8 @@ class List(Param):
|
||||
def __unicode_csv_reader(self, unicode_csv_data, dialect=csv.excel, **kwargs):
|
||||
# csv.py doesn't do Unicode; encode temporarily as UTF-8:
|
||||
csv_reader = csv.reader(self.__utf_8_encoder(unicode_csv_data),
|
||||
dialect=dialect, delimiter=self.separator,
|
||||
dialect=dialect,
|
||||
delimiter=self.separator, escapechar='\\',
|
||||
skipinitialspace=self.skipspace,
|
||||
**kwargs)
|
||||
for row in csv_reader:
|
||||
|
@ -141,7 +141,8 @@ class LDAPUpdate:
|
||||
def __unicode_csv_reader(self, unicode_csv_data, quote_char="'", dialect=csv.excel, **kwargs):
|
||||
# csv.py doesn't do Unicode; encode temporarily as UTF-8:
|
||||
csv_reader = csv.reader(self.__utf_8_encoder(unicode_csv_data),
|
||||
dialect=dialect, delimiter=',',
|
||||
dialect=dialect,
|
||||
delimiter=',', escapechar='\\',
|
||||
quotechar=quote_char,
|
||||
skipinitialspace=True,
|
||||
**kwargs)
|
||||
|
Loading…
Reference in New Issue
Block a user