do not create fifo if not there

This commit is contained in:
Florian Streibelt 2011-10-12 02:46:36 +02:00
parent 7bcc8f0c18
commit 5c15a18110
1 changed files with 3 additions and 8 deletions

View File

@ -35,16 +35,11 @@ display_fifo = None
def print_display(s): def print_display(s):
global display_fifo global display_fifo
"""
Comment out this return for now if you dont
want to use the display.
return
"""
if not display_fifo: if not display_fifo:
try: try:
display_fifo = open('/tmp/display', 'w') #display_fifo = open('/tmp/display', 'w')
fd = os.open( "/tmp/display", os.O_WRONLY)
display_fifo = os.fdopen(fd,"w")
except IOError: except IOError:
display_fifo = None display_fifo = None
return return