[warning] fix read before assignment
R=iannucci
Change-Id: I710b18b916743251320ae3d8d896e7fb2e3c694c
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/recipes-py/+/2441886
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
diff --git a/recipe_engine/recipe_api.py b/recipe_engine/recipe_api.py
index 391544d..d2b0681 100644
--- a/recipe_engine/recipe_api.py
+++ b/recipe_engine/recipe_api.py
@@ -290,7 +290,7 @@
not isinstance(recorder, record.WarningRecorder)):
raise ValueError('Expected either an instance of WarningRecorder '
'or NULL_WARNING_RECORDER sentinel. Got type '
- '(%s): %r' % (type(self._recorder), self._recorder))
+ '(%s): %r' % (type(recorder), recorder))
self._recorder = recorder
# A repo may locate inside another repo (e.g. generally, deps repos are
# inside main repo). So we should start with the repo with the longest