예제 #1
0
def checkinmode():
    """The checkin screen"""
    clear()
    ui.chk()
    iny = raw_input("NAME:   ")
    if iny == ":EXIT": checkpremenu()
    else: pass

    def markin(uid):
        db.checkin(uid)

    try:
        x = db.osearch("name", iny)
        if chky(x.id) is False:
            markin(x.id)
            ui.ok()
            time.sleep(1)
            checkinmode()
        elif chky(x.id) is True:
            ui.chkold()
            time.sleep(1)
            checkinmode()
        else:  #@error 003
            ui.err("#003")
            time.sleep(1)
            checkinmode()
    except AttributeError:  #@Error 001
        ui.fail()
        time.sleep(1)
        checkinmode()
예제 #2
0
파일: main.py 프로젝트: b1naryth1ef/Checkin
def checkinmode():
	"""The checkin screen"""
	clear()
	ui.chk()
	iny = raw_input("NAME:   ")
	if iny == ":EXIT": home()
	else: pass
	def markin(uid):
		db.checkin(uid)
	try:
		x = db.osearch("name",iny)
		if chky(x.id) is False:
			markin(x.id)
			ui.ok()
			time.sleep(1)
			checkinmode()
		elif chky(x.id) is True:
			ui.chkold()
			time.sleep(1)
			checkinmode()
		else:	#@error 003
			ui.err("#003")
			time.sleep(1)
			checkinmode()
	except AttributeError: #@Error 001
		ui.fail()
		time.sleep(1)
		checkinmode()
예제 #3
0
파일: main.py 프로젝트: harryd/Checkin
def checkinmode():
	clear()
	ui.chk()
	iny = raw_input("NAME:   ")
	if iny == ":EXIT":
		home()
	else:
		pass
	def markin(uid):
		db.checkin(uid)
	try:
		x = db.find_user("name",iny)
		if chky(x.id) is False:
			markin(x.id)
			ui.ok()
			time.sleep(1)
			checkinmode()
		elif chky(x.id) is True:
			ui.chkold()
			time.sleep(1)
			checkinmode()
		else:	#@error 003
			ui.err("#003")
			time.sleep(1)
			checkinmode()
	except AttributeError: #@Error 001
		ui.fail()
		time.sleep(1)
		checkinmode()
	except: #@error 002
		#print sys.exc_info()[0]
		ui.err("#002")
		time.sleep(1)
		sys.exit()