]> git.pld-linux.org Git - projects/pld-builder.new.git/commitdiff
Error can be string, so check that.
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Jun 2013 07:19:21 +0000 (09:19 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Jun 2013 07:19:21 +0000 (09:19 +0200)
PLD_Builder/rpm_builder.py

index 9c08c8802c1aa847d3159dd9b263b57b95a81b0b..555cb36af80f11e26ad7cbccc6d33029184e4752 100644 (file)
@@ -106,7 +106,9 @@ def fetch_src(r, b):
                 b.log_line(msg)
                 return False
         except urllib2.URLError, error:
-            errno = error.reason.errno
+            errno = 0
+            if isinstance(error.args[0], IOError):
+                errno = error.args[0].errno
 
             if errno in [-3, 60, 61, 110, 111]:
                 b.log_line("unable to connect to %s... trying again" % (src_url))
This page took 0.169757 seconds and 4 git commands to generate.