From 5c15a18110edca305aac96e0193a6374a5b67a8b Mon Sep 17 00:00:00 2001 From: Florian Streibelt Date: Wed, 12 Oct 2011 02:46:36 +0200 Subject: [PATCH] do not create fifo if not there --- client-barcode/freitagskasse.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/client-barcode/freitagskasse.py b/client-barcode/freitagskasse.py index 1e6fdff..dec31a4 100644 --- a/client-barcode/freitagskasse.py +++ b/client-barcode/freitagskasse.py @@ -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