aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Moch2018-03-02 05:36:55 -0500
committerDaniel Moch2018-03-02 05:36:55 -0500
commitaba60175b6e294f6ee18cd9be14189d6c62e7b00 (patch)
tree1b2615ba6b60be03f32afb63acacd6a0fa85f892
parentc74a05c35364e882f0cc8b86d4d527c56363bb09 (diff)
downloadcbr-schedule-aba60175b6e294f6ee18cd9be14189d6c62e7b00.tar.gz
Remove trailing commas from CSV
-rw-r--r--schedule.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/schedule.py b/schedule.py
index 285bb6d..0443ad3 100644
--- a/schedule.py
+++ b/schedule.py
@@ -62,15 +62,13 @@ class Schedule:
outfile.write('\n')
for entry in self.data:
outfile.write('"' + entry['day_of_week'] + ', ' + \
- entry['month'] + ' ' + str(entry['day']) + '"' \
- + ',')
+ entry['month'] + ' ' + str(entry['day']) + '"')
for column in self._column_section_mapping.keys():
for reading in entry['readings']:
if reading['section'] in \
self._column_section_mapping[column]:
- outfile.write('"' + reading['book'] + ' ' + \
+ outfile.write(',"' + reading['book'] + ' ' + \
reading['reading'] + '"')
- outfile.write(",")
outfile.write('\n')
def export(self):