From 81c274db3f2a7ce9f58a10dfdd05d94bb67e1023 Mon Sep 17 00:00:00 2001 From: "n8henrie@gmail.com" Date: Thu, 25 Apr 2013 16:30:21 -0600 Subject: [PATCH] Fixed a bug that allowed space-only subjects. --- icsconverter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icsconverter.py b/icsconverter.py index fc1df9a..5b7c51a 100755 --- a/icsconverter.py +++ b/icsconverter.py @@ -47,9 +47,9 @@ def CleanSpaces(csv_dict): # function gets rid of trailing spaces. try: if isdir(expanduser("~/Desktop")): - reader_builder = list(csv.DictReader(open(easygui.fileopenbox(msg="Please select the .csv file to be converted to .ics", title="", default=expanduser("~/Desktop/"), filetypes=["*.csv"]), 'rb'))) + reader_builder = list(csv.DictReader(open(easygui.fileopenbox(msg="Please select the .csv file to be converted to .ics", title="", default=expanduser("~/Desktop/"), filetypes=["*.csv"]), 'rb'), skipinitialspace = True)) else: - reader_builder = list(csv.DictReader(open(easygui.fileopenbox(msg="Please select the .csv file to be converted to .ics", title="", default=expanduser("~/"), filetypes=["*.csv"]), 'rb'))) + reader_builder = list(csv.DictReader(open(easygui.fileopenbox(msg="Please select the .csv file to be converted to .ics", title="", default=expanduser("~/"), filetypes=["*.csv"]), 'rb'), skipinitialspace = True)) except: easygui.msgbox('Looks like there was an error opening the file, didn\'t even make it to the conversion part. Sorry!') exit(1)