X-Git-Url: https://git.ucc.asn.au/?p=uccvend-vendserver.git;a=blobdiff_plain;f=VendServer%2FVendServer.py;fp=VendServer%2FVendServer.py;h=f7bc9927048c02a3a9464b1aeab3bf3ef3d52900;hp=6c529334ec61b944decd8b17a08d9b1eb079dcd7;hb=50ed02d24589bb4340802826f11125f5e5c9038a;hpb=6838aa5069d4078fef452e626076dde15c596c03 diff --git a/VendServer/VendServer.py b/VendServer/VendServer.py index 6c52933..f7bc992 100755 --- a/VendServer/VendServer.py +++ b/VendServer/VendServer.py @@ -370,7 +370,7 @@ class VendServer(): self.vstatus.cur_pin = '' self.vstatus.cur_user = '' self.vstatus.cur_selection = '' - _last_card_id = -1 + self._last_card_id = -1 self.vstatus.mk.set_messages([(self.center('BYE!'), False, 1.5)]) self.reset_idler(2) return @@ -405,6 +405,7 @@ class VendServer(): Triggered when the user has entered the id of something they would like to purchase. """ def make_selection(self): + logging.debug('Dispense item "%s"' % (self.vstatus.cur_selection,)) # should use sudo here if self.vstatus.cur_selection == '55': self.vstatus.mk.set_message('OPENSESAME') @@ -803,6 +804,8 @@ class VendServer(): self.reset_idler(2) return else: + self.vstatus.cur_user = '----' + self.vstatus.username = self.dispense.getUsername() self.vstatus.cur_selection = '' self.vstatus.change_state(STATE_GET_SELECTION) self.scroll_options(self.vstatus.username, self.vstatus.mk, True)