Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
frontend/db/backends/afe/base.py: Fix pylint complaint
pylint reveals: ************* Module frontend.db.backends.afe.base E0203: 28:DatabaseWrapper._valid_connection: Access to member 'connection' before its definition line 35 E0203: 29:DatabaseWrapper._valid_connection: Access to member 'connection' before its definition line 35 E0203: 31:DatabaseWrapper._valid_connection: Access to member 'connection' before its definition line 35 E0203: 34:DatabaseWrapper._valid_connection: Access to member 'connection' before its definition line 35 Turns out that we do reference self.connection (in fact defined on base classes), but for pylint this attribute is not defined (machines that run pylint checks might not have mysql-python installed). After checking the code of the base classes, we verify that during init self.connection is initialized with None anyway, so with this change we silence yet another pylint complaint (and since it's called before the base classes init method, they'll take care of setting it to something useful anyway). Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
- Loading branch information