TypeError: unorderable types: int() < NoneType() possible during quota limit check
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
melanie witt |
Bug Description
Saw this on a recent py35 unit test run [1]:
Traceback (most recent call last):
File "/home/
self.
File "/home/
project_id)
File "/home/
result = fn(cls, context, *args, **kwargs)
File "/home/
cls.
File "/home/
result = fn(cls, context, *args, **kwargs)
File "/home/
project_
File "/home/
user_
File "/home/
overs = [key for key, val in merged_
File "/home/
if merged_quotas[key] >= 0 and merged_quotas[key] < val]
TypeError: unorderable types: int() < NoneType()
The problem is some logic that tries to .get(key) a value from one of two dicts that contains the key [2] and if the found value is 0, it won't take precedence over a default not found value of None. In the case where None is picked, we end up with a merged value of None, which blows up (thankfully) in Python 3.
[1] http://
[2] https:/
Fix proposed to branch: master /review. openstack. org/471973
Review: https:/