Patchwork [2/2] classes/sanity: import regular expression module in SuSE distro check

login
register
mail settings
Submitter Paul Eggleton
Date April 18, 2012, 9:56 a.m.
Message ID <1b97cb1f9c2a8b46cb97b68364bcdcbbd89c6056.1334742865.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/26115/
State Accepted
Commit cb1f7cffc171e6b182f33a69ff688d76b7f1baed
Headers show

Comments

Paul Eggleton - April 18, 2012, 9:56 a.m.
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>
---
 meta/classes/sanity.bbclass |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch

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