Skip to content

Commit

Permalink
Catch AttributeError from node
Browse files Browse the repository at this point in the history
It turns out that json.loads accept strings with numerical values,
such as '3.11', and raises no exception. Then there is a problem
in function where we treat the value as dictionary with doing .get(),
which results in AttributeError. This commit catches that.
  • Loading branch information
sdatko committed Mar 21, 2022
1 parent b188988 commit 157cfd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion devnest/lib/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def _get_reservation_info(self):
owner,
reprovision_pending)

except (TypeError, ValueError):
except (AttributeError, TypeError, ValueError):
LOG.debug('Could not read reservation data for node %s,'
' invalid json format: %s' % (self.get_name(),
offline_cause_reason))
Expand Down

0 comments on commit 157cfd3

Please sign in to comment.