From d4aaebf0c86bbb637d994d4a1eb5e588a088944c Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Mon, 27 Jul 2020 10:44:30 -0400 Subject: [PATCH] Set errors to replace for getting raw item in Item class --- api/ECNQueue.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/api/ECNQueue.py b/api/ECNQueue.py index 7b95c9b..b83fefa 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -19,11 +19,9 @@ # Queues to not load in getQueues() queuesToIgnore = ["archives", "drafts", "inbox"] -# B/c of unicode errors to be dealt with later. -# See coral104 +# B/c some items don't have a From field +# See coral259 queuesToIgnore.append("coral") -# See potr4 -queuesToIgnore.append("potr") @@ -90,7 +88,7 @@ def __getRawItem(self) -> list: Returns: list: List of all the lines in the item file """ - with open(self.__path) as file: + with open(self.__path, errors="replace") as file: return file.readlines() def __getHeaderBoundary(self) -> int: