Code review comment for lp:~bcwaldon/nova/osapi-servers-links

Revision history for this message
Matt Dietz (cerberus) wrote :

115 +import re
116 +from nova import exception
117 +from webob import exc

Pep8 says modules should be ordered as such:

1. standard library imports
2. related third party imports
3. local application/library specific imports

So it should be re, webob and finally nova. Most people seem to be leaving a line of whitespace between each "tier" of module import

519 + if inst.get('instance_type') != None:

A little nit-picky, but you don't need to be this explicit. If inst.get(...): would be sufficient

540 + flavor_id = inst.get("instance_type", None)

Get already by default returns None

For the *_id cases near the above, you probably want to leave them the way they are since 0 obviously equates to false.

review: Needs Fixing

« Back to merge proposal