Minor bug fixes to get it working
authorMitchell Pomery <bob_george33@hotmail.com>
Sat, 4 Apr 2015 04:23:29 +0000 (12:23 +0800)
committerMark Tearle <mark@tearle.com>
Sun, 5 Apr 2015 11:41:20 +0000 (19:41 +0800)
VendServer/OpenDispense.py
VendServer/VendServer.py

index b4f481c..4eadcf6 100644 (file)
@@ -26,7 +26,7 @@ class OpenDispense(DispenseInterface):
        def authUserIdPin(self, userId, pin):
                try:
                        # Get info from 
        def authUserIdPin(self, userId, pin):
                try:
                        # Get info from 
-                       info = pwd.getpwuid(userId)
+                       info = pwd.getpwuid(int(userId))
                except KeyError:
                        logging.info('getting pin for uid %d: user not in password file'%userId)
                        return False
                except KeyError:
                        logging.info('getting pin for uid %d: user not in password file'%userId)
                        return False
index f642dc4..dd35cd4 100755 (executable)
@@ -172,7 +172,7 @@ class VendServer():
        def scroll_options(self, username, mk, welcome = False):
                # If the user has just logged in, show them their balance
                if welcome:
        def scroll_options(self, username, mk, welcome = False):
                # If the user has just logged in, show them their balance
                if welcome:
-                       balance = dispense.getBalance()
+                       balance = self.dispense.getBalance()
                        
                        msg = [(self.center('WELCOME'), False, TEXT_SPEED),
                                   (self.center(self.dispense.getUsername()), False, TEXT_SPEED),
                        
                        msg = [(self.center('WELCOME'), False, TEXT_SPEED),
                                   (self.center(self.dispense.getUsername()), False, TEXT_SPEED),
@@ -720,6 +720,7 @@ class VendServer():
                                return
                        """
 
                                return
                        """
 
+                       """
                        if self.dispense.isDisabled():
                                logging.info('user '+self.vstatus.cur_user+' is disabled')
                                self.vstatus.mk.set_messages(
                        if self.dispense.isDisabled():
                                logging.info('user '+self.vstatus.cur_user+' is disabled')
                                self.vstatus.mk.set_messages(
@@ -729,7 +730,7 @@ class VendServer():
                                
                                self.reset_idler(3)
                                return
                                
                                self.reset_idler(3)
                                return
-
+                       """
 
                        self.vstatus.cur_pin = ''
                        self.vstatus.mk.set_message('PIN: ')
 
                        self.vstatus.cur_pin = ''
                        self.vstatus.mk.set_message('PIN: ')

UCC git Repository :: git.ucc.asn.au