diff options
author | Matthew Booth <mbooth@redhat.com> | 2014-12-10 12:03:42 +0000 |
---|---|---|
committer | Matthew Booth <mbooth@redhat.com> | 2014-12-10 16:54:42 +0000 |
commit | 3c2a7c8ec4058d51609544e4314f23d571bb9dc1 (patch) | |
tree | 743845c2d6fa2458781be9b90cb37a19a4bb67b3 /nova/hacking | |
parent | 99c5172ab924f7c8dd9a515bca713f095432d768 (diff) | |
download | nova-3c2a7c8ec4058d51609544e4314f23d571bb9dc1.tar.gz |
Only check db/api.py for session in arguments
We were checking both db/api.py and db/sqlalchemy/api.py for session
in db apis, but db apis are only defined externall in db/api.py. This
rule will falsely match on non-api methods in db/sqlalchemy/api.py
which take a session argument. Passing the session around within this
module is considered a good thing.
Change-Id: Ibf5d1284b44013c736b6b70ca4fa5d706c365c7d
Diffstat (limited to 'nova/hacking')
-rw-r--r-- | nova/hacking/checks.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/hacking/checks.py b/nova/hacking/checks.py index 98e6d08a55..795ed45278 100644 --- a/nova/hacking/checks.py +++ b/nova/hacking/checks.py @@ -133,7 +133,7 @@ def import_no_db_in_virt(logical_line, filename): def no_db_session_in_public_api(logical_line, filename): - if "db/api.py" in filename or "db/sqlalchemy/api.py" in filename: + if "db/api.py" in filename: if session_check.match(logical_line): yield (0, "N309: public db api methods may not accept session") |