From: Paul Eggleton Date: Wed, 18 Apr 2012 09:56:10 +0000 (+0100) Subject: classes/sanity: import regular expression module in SuSE distro check X-Git-Tag: 2015-4~10935 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=cb1f7cffc171e6b182f33a69ff688d76b7f1baed;p=openembedded-core.git classes/sanity: import regular expression module in SuSE distro check 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 Signed-off-by: Richard Purdie --- diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index 3ec449c746..9cd04c42bc 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -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()