From bff8121689c65d28f420998a25e5786563e65a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrer=20=C3=96zen?= Date: Wed, 1 Nov 2006 13:18:48 +0000 Subject: [PATCH] =?UTF-8?q?debug=20=C5=9Feysi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pisi/comariface.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pisi/comariface.py b/pisi/comariface.py index bd71d907..66a26e66 100644 --- a/pisi/comariface.py +++ b/pisi/comariface.py @@ -43,16 +43,18 @@ def wait_comar(): import socket, time sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) timeout = 5 + sockname = "/var/run/comar.socket" + if ctx.comar_sockname: + sockname = ctx.comar_sockname while timeout > 0: try: - if ctx.comar_sockname: - sock.connect(ctx.comar_sockname) - else: - sock.connect("/var/run/comar.socket") + sock.connect(sockname) return True except KeyboardInterrupt: raise except Exception, e: #FIXME: what exception could we catch here, replace with that. + # DEBUG: remove before release + ctx.ui.info("COMARDEBUG: trying to connect '%s', but got %s: %s" % (sockname, e.__class__, e)) timeout -= 0.2 time.sleep(0.2) return False