From 3b57312fa7b3e708bfdac5ba00b25f73abee9fa6 Mon Sep 17 00:00:00 2001 From: Daniel Wallace Date: Fri, 2 Mar 2018 07:58:09 -0700 Subject: [PATCH] fix reference if key is not in locals --- pepper/libpepper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pepper/libpepper.py b/pepper/libpepper.py index 236d359..482810c 100644 --- a/pepper/libpepper.py +++ b/pepper/libpepper.py @@ -453,7 +453,7 @@ def login(self, username=None, password=None, eauth=None, **kwargs): 'username', 'password', 'eauth' - ) if locals()[key] is not None + ) if locals().get(key, None) is not None ) ) self.auth = self._send_auth('/login', **kwargs).get('return', [{}])[0]