Skip to content

Commit

Permalink
Set errors to replace for getting raw item in Item class
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbell committed Jul 27, 2020
1 parent b49fa3d commit d4aaebf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions api/ECNQueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")



Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit d4aaebf

Please sign in to comment.