do not create fifo if not there
This commit is contained in:
parent
7bcc8f0c18
commit
5c15a18110
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue