sleep entfernt, etc

This commit is contained in:
Florian Streibelt 2011-10-19 12:45:28 +02:00
parent a0f1acffc1
commit 10962d479f
1 changed files with 6 additions and 6 deletions

View File

@ -396,14 +396,14 @@ def print_prompt():
def handle(line, status):
myDisplay.setIdlemessage("Mir ist langweilig!")
if line == 'exit':
clear()
myDisplay.write("\x0c")
myDisplay.cmd_clear()
myDisplay.terminate()
sys.exit(0)
if status.logged_in():
myDisplay.setIdlemessage(" Comitten nicht vergessen! ***")
if line in CODES:
call = CODES[line]
method = call[0]
@ -422,9 +422,9 @@ def handle(line, status):
else:
status.buy(item)
else:
myDisplay.setIdlemessage("Mir ist langweilig!")
try:
status.login(line)
myDisplay.setIdlemessage(" Comitten nicht vergessen! ***")
except urllib2.HTTPError as e:
if e.code == 404: # URL not found == user unknown
# Try same code as a product
@ -488,8 +488,7 @@ def main():
myDisplay.cmd_reset()
myDisplay.cmd_cursor_show(False)
myDisplay.display_screen("HINWEIS","Herzlich willkommen bei der Freitagsrunde! *** ")
time.sleep(5)
myDisplay.display_screen("Bitte Geduld","Initialisierung... ")
while True:
clear()
status.dump()
@ -506,6 +505,7 @@ if __name__ == '__main__':
main()
except KeyboardInterrupt:
myDisplay.terminate()
myDisplay.write("\x1b\x40Goodbye!")
myDisplay.cmd_reset()
myDisplay.cmd_cursor_show(False)
pass