From 02ab227ecabd90cdd7e54a633e10023979152550 Mon Sep 17 00:00:00 2001 From: benne238 Date: Wed, 27 Jan 2021 21:04:33 -0500 Subject: [PATCH] fix for accounting for empty content in messages --- api/ECNQueue.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/api/ECNQueue.py b/api/ECNQueue.py index b0e1fd6..de18df3 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -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"] @@ -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 @@ -1351,4 +1351,8 @@ def loadQueues() -> list: for queue in getValidQueues(): queues.append(Queue(queue)) - return queues \ No newline at end of file + return queues + +if __name__ == "__main__": + item = Item("aae", 55) + print() \ No newline at end of file