From 0a86d9391cedc2789346d393801ae56809e75da2 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 17 Oct 2011 22:44:31 +0200 Subject: [PATCH] client-barcode: Extra method Status.logout() --- client-barcode/freitagskasse.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client-barcode/freitagskasse.py b/client-barcode/freitagskasse.py index 4c3b604..40c38bf 100644 --- a/client-barcode/freitagskasse.py +++ b/client-barcode/freitagskasse.py @@ -377,6 +377,10 @@ class Status: self.balance = balance self.transfers = list() + def logout(self): + # Must not fail if not logged in + self._reset() + def commit(self): assert(self.logged_in()) @@ -397,8 +401,8 @@ class Status: self.dump() delay('Logout', 3) - # Logout - self._reset() + self.logout() + def find(self, barcode): try: