Mercurial > repos > jjohnson > query_tabular
changeset 3:125fc5d123b3
Remove \r\n chars from input when loading db table
author | Jim Johnson <jj@umn.edu> |
---|---|
date | Wed, 04 Nov 2015 15:45:19 -0600 |
parents | ffa5e34a55c1 |
children | |
files | query_tabular.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/query_tabular.py Sun Oct 04 10:52:21 2015 -0400 +++ b/query_tabular.py Wed Nov 04 15:45:19 2015 -0600 @@ -94,7 +94,7 @@ continue data_lines += 1 try: - fields = line.split('\t') + fields = line.rstrip('\r\n').split('\t') vals = [col_func[i](x) if x else None for i,x in enumerate(fields)] c.execute(insert_stmt,vals) except Exception, e: