Skip to content

Commit a880c07

Browse files
committed
Avoid traceback with concurrent execution. Fixes #197
when running `pylint --jobs 2` the behavior is probably somewhat flaky but we can at least avoid crashing when the element is not on the list
1 parent c0eb6cb commit a880c07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pylint_django/checkers/db_performance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ def register(linter):
117117
"""Required method to auto register this checker."""
118118
# don't blacklist migrations for this checker
119119
new_black_list = list(linter.config.black_list)
120-
new_black_list.remove('migrations')
120+
if 'migrations' in new_black_list:
121+
new_black_list.remove('migrations')
121122
linter.config.black_list = new_black_list
122123

123124
linter.register_checker(NewDbFieldWithDefaultChecker(linter))

0 commit comments

Comments
 (0)