]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Python3: Do not compare NoneType and integers
authorCyril Roelandt <cyril@redhat.com>
Thu, 16 Jul 2015 21:12:58 +0000 (21:12 +0000)
committerCyril Roelandt <cyril@redhat.com>
Fri, 17 Jul 2015 10:19:54 +0000 (12:19 +0200)
commit9976048b6044a266231621daf1a4e90199df75b8
tree1e280d9b9d2d919e23a635578ec249378605a2bb
parenteb9226214fbf3d7a1812ca454c7c304769e262dc
Python3: Do not compare NoneType and integers

In Python 2:
>>> None > 0
False

In Python 3:
>>> None > 0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unorderable types: NoneType() > int()

This commit does not change the behaviour of the affected code, but fixes the
TypeError that is raised in Python 3.

Some tests have been added to the py34 section of tox.ini, but are currently
commented out: these are tests that work with this patch and a fixed version of
Routes.

Change-Id: Ia00a2ad90206853f78ed93cf540bce54baab00e7
Blueprint: neutron-python3
neutron/plugins/ml2/managers.py
tox.ini