Skip to content

Commit 7fd6154

Browse files
author
Richard Jones
committed
open CSV files in "universal newline" mode
1 parent 6911fdf commit 7fd6154

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Fixed:
4141
- popup listing uses filter args (thanks Marlon van den Berg)
4242
- fixed editing of message contents
4343
- loosened the detection of issue cross-references in messages
44+
- open CSV files in "universal newline" mode
4445

4546

4647
2004-10-15 0.7.8

roundup/admin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: admin.py,v 1.82 2004-10-19 09:15:32 a1s Exp $
19+
# $Id: admin.py,v 1.83 2004-10-20 04:45:01 richard Exp $
2020

2121
'''Administration commands for maintaining Roundup trackers.
2222
'''
@@ -1108,7 +1108,7 @@ def do_import(self, args):
11081108
cl = self.get_class(classname)
11091109

11101110
# ensure that the properties and the CSV file headings match
1111-
f = open(os.path.join(dir, file))
1111+
f = open(os.path.join(dir, file), 'rU')
11121112
reader = rcsv.reader(f, rcsv.colon_separated)
11131113
file_props = None
11141114
maxid = 1
@@ -1126,7 +1126,7 @@ def do_import(self, args):
11261126
f.close()
11271127

11281128
# import the journals
1129-
f = open(os.path.join(args[0], classname + '-journals.csv'))
1129+
f = open(os.path.join(args[0], classname + '-journals.csv'), 'rU')
11301130
reader = rcsv.reader(f, rcsv.colon_separated)
11311131
cl.import_journals(reader)
11321132
f.close()

0 commit comments

Comments
 (0)