[oe-commits] Paul Eggleton : classes/sanity: import regular expression module in SuSE distro check

git at git.openembedded.org git at git.openembedded.org
Wed Apr 18 11:03:32 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: cb1f7cffc171e6b182f33a69ff688d76b7f1baed
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=cb1f7cffc171e6b182f33a69ff688d76b7f1baed

Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date:   Wed Apr 18 10:56:10 2012 +0100

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 <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/sanity.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 3ec449c..9cd04c4 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()





More information about the Openembedded-commits mailing list