Skip to content

Some subjects appear blank when they're not. #9

Closed
campb303 opened this issue Aug 6, 2020 · 1 comment
Closed

Some subjects appear blank when they're not. #9

campb303 opened this issue Aug 6, 2020 · 1 comment
Assignees
Labels
bug An issue that results in webqueue2 breaking tooling Related to tools and utilities for the management of the project

Comments

@campb303
Copy link
Collaborator

campb303 commented Aug 6, 2020

When parsing item subjects, some items report a blank subject when they're not.

Examples include me67, uds14 and ece47 in q-snapshot.

@campb303 campb303 added bug An issue that results in webqueue2 breaking tooling Related to tools and utilities for the management of the project labels Aug 6, 2020
@benne238
Copy link
Collaborator

benne238 commented Aug 31, 2020

The issue was that the last header was never being parsed.

for lineNumber in range(self.__getHeaderBoundary() - 1):
    line = self.__rawItem[lineNumber]
    lineHasQueuePrefix = queuePrefixPattern.match(line)

The __getHeaderBoundary() function returns the line number where the headers end. The -1 was added to this range to limit the for loop from parsing the header boundary. However, the range() function is non-inclusive on its upper bound so when it is passed a value n, it returns a range from 0 to n-1 making the -1 unnecessary.

Sign in to join this conversation on GitHub.
Labels
bug An issue that results in webqueue2 breaking tooling Related to tools and utilities for the management of the project
Projects
None yet
Development

No branches or pull requests

2 participants