changeset 3448:f26af7360865

parser.text_csv: fixed bug sniffing empty line
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 30 Mar 2008 10:27:23 +0200
parents e5543417b366
children 933bb04c0935
files MoinMoin/parser/text_csv.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_csv.py	Sun Mar 30 10:26:19 2008 +0200
+++ b/MoinMoin/parser/text_csv.py	Sun Mar 30 10:27:23 2008 +0200
@@ -54,7 +54,9 @@
 
         # workaround csv.reader deficiency by encoding to utf-8
         data = raw.encode('utf-8').split('\n')
-        delimiter = Sniffer().sniff(data[0]).delimiter
+        delimiter = ';'
+        if data[0]:
+            delimiter = Sniffer().sniff(data[0]).delimiter
 
         visible = None
         hiddenindexes = []