def checkin_user(): print_xfair_banner() print "Type nothing (and just press enter) to accept the value between the []." print "Press Control-C to start over." kerberos = prompt("Enter your kerberos") default_name, default_major, default_email = fetch_user(kerberos) user = User() user.name = prompt("Enter your name", default=default_name) user.major = prompt("Enter your major(s), comma separated", default=default_major) user.graduation = prompt("Enter your graduation year, or 'Graduate' for grad students") user.email = prompt("Enter your email", default=default_email) return user
def checkin_user(): print_xfair_banner() print "Welcome to the express line!" mit_id = prompt("Please scan the barcode on the back of your MIT ID") if mit_id not in users: print "ERROR: Your MIT ID was not found. Please use the regular check-in lines." time.sleep(4) raise ReferenceError() user = users[mit_id] result = User() result.name = user['name'] result.email = user['email'] result.graduation = user['graduation'] result.major = user['major'] return result