[Uludag-commits] r10091 - trunk/pisi/pisi
svn-uludag at uludag.org.tr
svn-uludag at uludag.org.tr
2 Kas 2006 Per 11:17:37 EET
Author: gurer
Date: Thu Nov 2 11:17:37 2006
New Revision: 10091
Modified:
trunk/pisi/pisi/comariface.py
Log:
bare except'ler çöpe
Modified: trunk/pisi/pisi/comariface.py
=================================================================
--- trunk/pisi/pisi/comariface.py (original)
+++ trunk/pisi/pisi/comariface.py Thu Nov 2 11:17:37 2006
@@ -36,7 +36,7 @@
return com
except ImportError:
raise Error(_("comar package is not fully installed"))
- except comar.Error:
+ except comar.CannotConnect:
raise Error(_("cannot connect to comar"))
def wait_comar():
@@ -50,11 +50,7 @@
try:
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))
+ except socket.error:
timeout -= 0.2
time.sleep(0.2)
return False
@@ -64,10 +60,7 @@
while 1:
try:
reply = com.read_cmd()
- except KeyboardInterrupt:
- raise
- except Exception, e: #FIXME: what exception could we catch here, replace with that.
- ctx.ui.info("COMARDEBUG: waiting reply, but got %s: %s" % (e.__class__, e))
+ except comar.LinkClosed:
# Comar postInstall does a "service comar restart" which cuts
# our precious communication link, so we waitsss
if package_name == "comar":
Uludag-commits mesaj listesiyle ilgili
daha fazla bilgi