Skip to content

Commit

Permalink
fix for accounting for empty content in messages
Browse files Browse the repository at this point in the history
  • Loading branch information
benne238 committed Jan 28, 2021
1 parent 610bc86 commit 02ab227
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions api/ECNQueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
currentFileDirectory = os.path.dirname(currentFilePath)
currentFileDirectoryParent = os.path.dirname(currentFileDirectory)
queueDirectory = os.path.join(currentFileDirectoryParent, "q-snapshot")

queueDirectory = "/home/pier/e/benne238/personalQueues"
# Queues to not load in getQueues()
queuesToIgnore = ["archives", "drafts", "inbox", "coral"]

Expand Down Expand Up @@ -264,7 +264,7 @@ def __parseSections(self) -> list:
sections.append(assignment)

# Checks for empty content within an item and returns and
if contentEnd == contentStart:
if contentEnd <= contentStart:
blankInitialMessage = self.__initialMessageParsing([""])
sections.append(blankInitialMessage)
return sections
Expand Down Expand Up @@ -1351,4 +1351,8 @@ def loadQueues() -> list:
for queue in getValidQueues():
queues.append(Queue(queue))

return queues
return queues

if __name__ == "__main__":
item = Item("aae", 55)
print()

0 comments on commit 02ab227

Please sign in to comment.