diff options
author | Jenkins <jenkins@review.openstack.org> | 2012-11-12 21:09:27 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2012-11-12 21:09:27 +0000 |
commit | e620fa9498267b2d2a68f8fab8c1f8bd944186a3 (patch) | |
tree | cd3e30d7030ef465a6b4d4e7eed723bc4914eaa0 /tools/hacking.py | |
parent | 4818ac182ba30eb0c549a0506c0ead6ce34148cf (diff) | |
parent | 9471282626e004296351a4a97fb51209a53e7f42 (diff) | |
download | nova-e620fa9498267b2d2a68f8fab8c1f8bd944186a3.tar.gz nova-e620fa9498267b2d2a68f8fab8c1f8bd944186a3.tar.xz nova-e620fa9498267b2d2a68f8fab8c1f8bd944186a3.zip |
Merge "Ban db import from nova/virt"
Diffstat (limited to 'tools/hacking.py')
-rwxr-xr-x | tools/hacking.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/hacking.py b/tools/hacking.py index a22e1c6ff..91d8fde60 100755 --- a/tools/hacking.py +++ b/tools/hacking.py @@ -271,6 +271,13 @@ def nova_import_alphabetical(logical_line, line_number, lines): % (split_previous[1], split_line[1])) +def nova_import_no_db_in_virt(logical_line, filename): + if ("nova/virt" in filename and + not filename.endswith("fake.py") and + "nova import db" in logical_line): + yield (0, "NOVA N307: nova.db import not allowed in nova/virt/*") + + def nova_docstring_start_space(physical_line): """Check for docstring not start with space. |