[chirp_devel] [PATCH] Open csv with universal newline support. #271
Tom Hayward
Thu Aug 9 15:41:38 PDT 2012
# HG changeset patch
# User Tom Hayward <tom at tomh.us>
# Date 1344552093 21600
# Node ID a1636a04cb68f5ba1a8889e583bfda8bc2f3b4b5
# Parent 59e3294b7d91870406bd4ec97b53878168543d98
Open csv with universal newline support. #271
Fixes opening files with old Mac-style \r newlines.
diff -r 59e3294b7d91 -r a1636a04cb68 chirp/generic_csv.py
--- a/chirp/generic_csv.py Mon Jul 30 09:03:59 2012 -0700
+++ b/chirp/generic_csv.py Thu Aug 09 16:41:33 2012 -0600
@@ -139,7 +139,7 @@
self._blank()
- f = file(self._filename, "r")
+ f = file(self._filename, "rU")
header = f.readline().strip()
f.seek(0, 0)
More information about the chirp_devel
mailing list