nova/nova/cmd
Gábor Antal 6bd802912d Switching expression order within if condition
In nova/cmd/manage.py, on line 294 [1] there is the following line:

  if value['limit'] < 0 or value['limit'] is None:

The problem occurs when value['limit'] is None, as this line tries
to compare None (object) with an integer value.

This comparsion is totally okay (without errors) in Python27.
But, if you run this on Python34, a TypError is raised:

  TypeError: unorderable types: NoneType() < int()

It is simply fixed with swapping the two expressions within the
if condition. Now if value['limit'] is None, the first expression
becomes true and second one does not get evaluated.

TrivialFix

[1]: https://github.com/openstack/nova/blob/master/nova/cmd/manage.py#L294

Change-Id: Id2b1ed67e1c2c9f1d1aa5a23740db2b18e2e7141
2016-09-13 13:28:26 +02:00
..
__init__.py move eventlet GREENDNS override to top level 2014-12-08 17:41:03 -05:00
all.py deprecate nova-all 2016-04-21 17:49:45 +00:00
api.py Remove TODO for service version caching 2016-08-22 10:00:42 -04:00
api_metadata.py config options: centralize section "service" 2016-04-04 16:39:02 +00:00
api_os_compute.py Device tagging API support 2016-06-29 20:55:16 -07:00
baseproxy.py baseproxy: stop requiring CONF.verbose 2016-05-16 16:57:21 +02:00
cells.py Remove deprecated manager option in cells.py 2016-08-02 16:54:09 +00:00
cert.py Deprecate os-certificates 2016-07-26 10:42:41 -04:00
common.py Refactors nova.cmd utils 2016-07-08 08:41:32 -07:00
compute.py Merge "Refactors nova.cmd utils" 2016-08-12 17:46:55 +00:00
conductor.py Config options: centralize options in conductor api 2016-02-09 14:06:51 +00:00
console.py Config options: Centralize console options 2016-04-06 15:32:24 +00:00
consoleauth.py Config options: Centralize consoleauth options 2016-03-31 15:13:46 +00:00
dhcpbridge.py Merge "Refactors nova.cmd utils" 2016-08-12 17:46:55 +00:00
idmapshift.py Fix invalid import order 2016-07-04 11:23:52 +05:30
manage.py Switching expression order within if condition 2016-09-13 13:28:26 +02:00
network.py Refactors nova.cmd utils 2016-07-08 08:41:32 -07:00
novncproxy.py config options: fix the missed cli options of novncproxy 2016-04-04 18:05:32 +08:00
policy_check.py Adds nova-policy-check cmd 2016-08-29 14:59:58 +08:00
scheduler.py Merge "Revert "Enable options for oslo.reports"" 2015-12-17 23:48:04 +00:00
serialproxy.py config options: centralize section "serial_console" 2015-11-19 11:00:20 +01:00
spicehtml5proxy.py config options: centralize 'spice' options 2016-04-11 10:34:05 +00:00
xvpvncproxy.py Revert "Enable options for oslo.reports" 2015-12-05 16:12:52 +00:00