]> code.ossystems Code Review - openembedded-core.git/commitdiff
sanity.bbclass: catch an extra exception in check_create_long_filename
authorJoshua Lock <josh@linux.intel.com>
Wed, 23 May 2012 23:28:59 +0000 (16:28 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 24 May 2012 07:34:51 +0000 (08:34 +0100)
The call to bb.mkdirhier() in check_create_long_filename() can fail with an
OSError, explicitly catch this and report something useful to the user.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
meta/classes/sanity.bbclass

index 25ddfeabb2e39f22f36f2b13df82a83c6c646c3b..ff258349b537fea2008880b3e49f38f117b496b0 100644 (file)
@@ -158,6 +158,8 @@ def check_create_long_filename(filepath, pathname):
             return "Failed to create a file with a long name in %s. Please use a filesystem that does not unreasonably limit filename length.\n" % pathname
         else:
             return "Failed to create a file in %s: %s.\n" % (pathname, strerror)
+    except OSError as (errno, strerror):
+        return "Failed to create %s directory in which to run long name sanity check: %s.\n" % (pathname, strerror)
     return ""
 
 def check_connectivity(d):