]> code.ossystems Code Review - openembedded-core.git/commitdiff
sanity.bbclass: Increased verbosity for connectivity check
authorMariano Lopez <mariano.lopez@linux.intel.com>
Tue, 28 Apr 2015 11:27:25 +0000 (12:27 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 May 2015 10:41:10 +0000 (11:41 +0100)
The connectivity sanity error doesn't tell you which URL failed to fetch nor how
it failed.

This provides the URL that failed and why it failed using BBFetchException
messages during the connectivity check.

[YOCTO #7592]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/sanity.bbclass

index f8b9fac4535442c6e16c094e0b4f39d999044e89..fc8c98051568603ef1462e38ca817229ca833763 100644 (file)
@@ -278,12 +278,12 @@ def check_connectivity(d):
         try:
             fetcher = bb.fetch2.Fetch(test_uris, data)
             fetcher.checkstatus()
-        except Exception:
+        except Exception as err:
             # Allow the message to be configured so that users can be
             # pointed to a support mechanism.
             msg = data.getVar('CONNECTIVITY_CHECK_MSG', True) or ""
             if len(msg) == 0:
-                msg = "Failed to fetch test data from the network. Please ensure your network is configured correctly.\n"
+                msg = "%s. Please ensure your network is configured correctly.\n" % err
             retval = msg
 
     return retval