diff options
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. |