diff --git a/r2/r2/controllers/reddit_base.py b/r2/r2/controllers/reddit_base.py index ec063af87..74d660f38 100644 --- a/r2/r2/controllers/reddit_base.py +++ b/r2/r2/controllers/reddit_base.py @@ -802,9 +802,9 @@ class RedditController(MinimalController): from r2.lib.contrib.pysolr import SolrError from r2.lib.indextank import IndextankException if isinstance(exception, SolrError): - errmsg = "SolrError: %r" % e + errmsg = "SolrError: %r" % exception - if (str(e) == 'None'): + if (str(exception) == 'None'): # Production error logs only get non-None errors g.log.debug(errmsg) else: