]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/fetch2: Ensure failed fetch attempts are logged in the debug logs
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 Feb 2011 12:14:20 +0000 (12:14 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 11 Feb 2011 12:14:20 +0000 (12:14 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/__init__.py

index b9e145a62ba5a0770de11ce978565c2053b60396..de2c6520e9cbf89f90070595e12795b67afb67bd 100644 (file)
@@ -451,8 +451,9 @@ def try_mirrors(d, origud, mirrors, check = False):
                  os.symlink(ud.localpath, origud.localpath)
             return ud.localpath
 
-        except bb.fetch2.BBFetchException:
+        except bb.fetch2.BBFetchException as e:
             logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url))
+            logger.debug(1, str(e))
             try:
                 if os.path.isfile(ud.localpath):
                     bb.utils.remove(ud.localpath)
@@ -894,7 +895,8 @@ class Fetch(object):
                             m.build_mirror_data(u, ud, self.d)
                         localpath = ud.localpath
 
-                    except BBFetchException:
+                    except BBFetchException as e:
+                        logger.debug(1, str(e))
                         # Remove any incomplete fetch
                         if os.path.isfile(ud.localpath):
                             bb.utils.remove(ud.localpath)