STATE_GRANDFATHER_CLOCK = 7
TEXT_SPEED = 0.8
+IDLE_SPEED = 0.02
class DispenseDatabaseException(Exception): pass
def scroll_options(username, mk, welcome = False):
if welcome:
msg = [(center('WELCOME'), False, TEXT_SPEED),
- (center(username), False, TEXT_SPEEd)]
+ (center(username), False, TEXT_SPEED)]
else:
msg = []
choices = ' '*10+'CHOICES: '
logging.info('getting pin for uid %d: .pin not found in home directory'%uid)
return None
if s.st_mode & 077:
- logging.info('getting pin for uid %d: .pin has wrong permissions'%uid)
- return None
+ logging.info('getting pin for uid %d: .pin has wrong permissions. Fixing.'%uid)
+ os.chmod(pinfile, 0600)
try:
f = file(pinfile)
except IOError:
global idler
if idler.finished():
choose_idler()
+ sleep(IDLE_SPEED)
idler.next()
class VendState:
if USE_DB: db = DispenseDatabase(v, cf.DBServer, cf.DBName, cf.DBUser, cf.DBPassword)
- vstatus.mk.set_message(GREETING)
setup_idlers(v)
choose_idler()
- vstatus.mk.set_message("Booted")
-
+ vstatus.mk.set_message(GREETING)
# This main loop was hideous and the work of the devil.
# This has now been fixed (mostly) - mtearle