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).

(From OE-Core rev: cb1f7cffc171e6b182f33a69ff688d76b7f1baed)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton 2012-04-18 10:56:10 +01:00 committed by Richard Purdie
parent f4eed2b8b8
commit d220e071ab
1 changed files with 1 additions and 0 deletions

View 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()