]> git.pld-linux.org Git - projects/pld-builder.new.git/commitdiff
- revert order
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 15 Jul 2009 15:27:46 +0000 (15:27 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    PLD_Builder/rpm_builder.py -> 1.100

PLD_Builder/rpm_builder.py

index 76a5985b3d85d1802f3d366c12e6e4f7b1a5d0e0..b5f7fbbf78489252440b4759859d022f32e9b0c3 100644 (file)
@@ -59,6 +59,9 @@ def check_skip_build(r, b):
         try:
             f = urllib2.urlopen(src_url)
             good = True
+        except urllib2.HTTPError, error:
+                f.close()
+                return False
         except urllib2.URLError, error:
             # see errno.h
             if error.errno in [-3, 60, 61, 110, 111]:
@@ -66,9 +69,6 @@ def check_skip_build(r, b):
                 continue
             else:
                 return False
-        except urllib2.HTTPError, error:
-                f.close()
-                return False
         return True
         f.close()
     return False
@@ -82,6 +82,12 @@ def fetch_src(r, b):
         try:
             f = urllib2.urlopen(src_url)
             good = True
+        except urllib2.HTTPError, error:
+            # fail in a way where cron job will retry
+            msg = "unable to fetch file, http code: %d" % error.code
+            b.log_line(msg)
+            f.close()
+            raise IOError, msg
         except urllib2.URLError, error:
             # see errno.h
             if error.errno in [-3, 60, 61, 110, 111]:
@@ -89,12 +95,6 @@ def fetch_src(r, b):
                 continue
             else:
                 raise
-        except urllib2.HTTPError, error:
-            # fail in a way where cron job will retry
-            msg = "unable to fetch file, http code: %d" % error.code
-            b.log_line(msg)
-            f.close()
-            raise IOError, msg
 
     o = chroot.popen("cat > %s" % b.src_rpm, mode = "w")
 
This page took 0.037602 seconds and 4 git commands to generate.