do not create fifo if not there

Bu işleme şunda yer alıyor:
Florian Streibelt 2011-10-12 02:46:36 +02:00
ebeveyn 7bcc8f0c18
işleme 5c15a18110
1 değiştirilmiş dosya ile 3 ekleme ve 8 silme

Dosyayı Görüntüle

@ -35,16 +35,11 @@ display_fifo = None
def print_display(s):
global display_fifo
"""
Comment out this return for now if you dont
want to use the display.
return
"""
if not display_fifo:
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:
display_fifo = None
return