diff --git a/icalevents/icaldownload.py b/icalevents/icaldownload.py index d94f04a..056082d 100644 --- a/icalevents/icaldownload.py +++ b/icalevents/icaldownload.py @@ -80,13 +80,13 @@ def data_from_file(self, file, apple_fix=False): content = f.read() if not content: - raise IOError("File %s is not readable or is empty!" % file) + raise OSError("File %s is not readable or is empty!" % file) return self.decode(content, apple_fix=apple_fix) def data_from_string(self, string_content, apple_fix=False): if not string_content: - raise IOError("String content is not readable or is empty!") + raise OSError("String content is not readable or is empty!") return self.decode(string_content, apple_fix=apple_fix) diff --git a/test/test_icaldownload.py b/test/test_icaldownload.py index 9f85a97..e55ca36 100644 --- a/test/test_icaldownload.py +++ b/test/test_icaldownload.py @@ -74,7 +74,7 @@ def test_data_from_file_apple(self): def test_empty_file(self): empty_ical = "test/test_data/empty.ics" - with self.assertRaises(IOError) as cm: + with self.assertRaises(OSError) as cm: icalevents.icaldownload.ICalDownload().data_from_file(empty_ical) self.assertEqual(