Changeset 135

Show
Ignore:
Timestamp:
04/14/08 03:24:23 (6 months ago)
Author:
njriley
Message:

remove unneeded imports; catch/log exceptions; wake the screen up on card swipe

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sucrose/trunk/python/sucrose

    r106 r135  
    11#!/afs/acm/sig/arch/sucrose/candy/bin/python 
    22 
    3 import threading 
    4 import sys 
     3import sys, subprocess, traceback 
    54 
    65from mysql import db 
    7  
    86from api import user_interface, sucrose, authenticator 
    97 
     
    1816 
    1917        while True: 
    20                 user = card.authenticate_session() 
    21                  
    22                 if not user: 
    23                         print "User does not exist" 
    24                         continue 
     18                try: 
     19                        user = card.authenticate_session() 
    2520 
    26                 keypad.TkinterUI(s,card) 
     21                        subprocess.call(['xset', 'dpms', 'force', 'on']) 
     22 
     23                        if not user: 
     24                                print "User does not exist" 
     25                                continue 
     26 
     27                        keypad.TkinterUI(s,card) 
     28                except: 
     29                        traceback.print_exc() 
     30