]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/sanity: import regular expression module in SuSE distro check
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 18 Apr 2012 09:56:10 +0000 (10:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Apr 2012 10:56:48 +0000 (11:56 +0100)
We call re.sub here, so we need to "import re" or an error occurs
(tested on OpenSuSE 12.1).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sanity.bbclass

index 3ec449c7461c69d7d716363bdaadae0c733925ef..9cd04c42bc754485ecf12ea36dc22a11236404b9 100644 (file)
@@ -124,6 +124,7 @@ def check_supported_distro(e):
         finally:
             f.close()
     elif os.path.exists("/etc/SuSE-release"):
+        import re
         f = open("/etc/SuSE-release", "r")
         try:
             distro = f.readline()