Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Equinix Parser #143

Merged
merged 7 commits into from
May 13, 2022
Merged

Fix Equinix Parser #143

merged 7 commits into from
May 13, 2022

Conversation

scetron
Copy link
Contributor

@scetron scetron commented May 11, 2022

Fixes #142 .

The parser was failing due to the exclusion of the year of the maintenance in the timestamp. The detailed time from the notification does not include the year, which is listed on a different line.

This fix parses the start and end year and adds it to the start and end date/time to get an accurate timestamp.

for b_elem in b_elements:
if "SPAN:" in b_elem.text:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why .text is needed here and not in the other if statements?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the relevant text is in the text of the b element rather than next to the b element:

<b>SPAN: 02-JUL-2021 - 03-JUL-2021</b>

vs

<b>UTC:</b> FRIDAY, 02 JUL 10:00 - FRIDAY, 02 JUL 15:00

Copy link
Collaborator

@chadell chadell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chadell chadell merged commit b967609 into develop May 13, 2022
@chadell chadell deleted the fix-equinix-ts branch May 13, 2022 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Equinix Parser Tests Failing
2 participants