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]