commit f4248a01cd098b0a5bf2d17e1e6dc4367f84a624
parent ba8320b3c896c53ff69546282947c92c5639a5be
Author: Samuel Walladge <samuel@swalladge.id.au>
Date: Mon, 23 Jan 2017 15:39:11 +1030
ensure token always None when login failed
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/simplenote_cli/simplenote.py b/simplenote_cli/simplenote.py
@@ -66,6 +66,7 @@ def authenticate(self, user, password):
token = res.text
if res.status_code != 200:
self.status = 'login failed with status {}, check credentials'.format(res.status_code)
+ token = None
else:
self.status = 'online'
except ConnectionError as e: