extras-buildsys/common CommonErrors.py,1.7,1.8

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Wed Aug 31 18:06:11 UTC 2005


Author: dcbw

Update of /cvs/fedora/extras-buildsys/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15638/common

Modified Files:
	CommonErrors.py 
Log Message:
Dont' traceback if error is not a tuple


Index: CommonErrors.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/common/CommonErrors.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CommonErrors.py	8 Jul 2005 18:16:22 -0000	1.7
+++ CommonErrors.py	31 Aug 2005 18:06:09 -0000	1.8
@@ -49,11 +49,14 @@
     Identify common network errors that mean we cannot connect to the server
     """
 
-    if e[0] == 111:     # Connection refused
-        return True
-    elif e[0] == 104:   # Connection reset by peer
-        return True
-    elif e[0] == 61:    # Connection refused
+    try:
+        if e[0] == 111:     # Connection refused
+            return True
+        elif e[0] == 104:   # Connection reset by peer
+            return True
+        elif e[0] == 61:    # Connection refused
+            return True
+    except IndexError:
         return True
 
     return False




More information about the fedora-extras-commits mailing list