Skip to content

Commit

Permalink
implementation of blank content handling
Browse files Browse the repository at this point in the history
  • Loading branch information
benne238 committed Jan 11, 2021
1 parent 2bd362c commit 30d9cfe
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions api/ECNQueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
currentFilePath = __file__
currentFileDirectory = os.path.dirname(currentFilePath)
currentFileDirectoryParent = os.path.dirname(currentFileDirectory)
queueDirectory = os.path.join(currentFileDirectoryParent, "q-snapshot")
#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 @@ -263,6 +264,12 @@ def __parseSections(self) -> list:
for assignment in assignementLsit:
sections.append(assignment)

# Checks for empty content within an item and returns and
if contentEnd == contentStart:
blankInitialMessage = self.__initialMessageParsing([""])
sections.append(blankInitialMessage)
return sections

# Checks for Directory Identifiers
if self.__rawItem[contentStart] == "\n" and self.__rawItem[contentStart + 1].startswith("\t"):

Expand Down Expand Up @@ -1345,4 +1352,4 @@ def loadQueues() -> list:
for queue in getValidQueues():
queues.append(Queue(queue))

return queues
return queues

0 comments on commit 30d9cfe

Please sign in to comment.