-
Notifications
You must be signed in to change notification settings - Fork 50
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
handle unattached hardware reservations #120
Conversation
fca0284
to
740b7fc
Compare
This is currently failing with: ``` TypeError: 'NoneType' object is not subscriptable ``` Signed-off-by: Adam Bozanich <adam.boz@gmail.com>
740b7fc
to
8e33d03
Compare
packet/HardwareReservation.py
Outdated
|
||
# not attached | ||
if data["device"] is None: | ||
self.attached_to = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could use except (KeyError, IndexError, TypeError):
in the following try
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@boz I think I would prefer that approach. The overfit error handling is mildly concerning, but I don't see any risks that are not already present in the previous try
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do.
I did it that way at first but I felt like it could shadow other problems too easily.
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
998e810
to
37af084
Compare
Thanks so much @displague - sorry I ran out of bandwidth, was just coming back to this. |
This is currently failing with: