From: Michael Lauer Date: Sun, 21 May 2006 16:17:03 +0000 (+0000) Subject: sanity.bbclass: make it work even when distutils is not available X-Git-Tag: Release-2010-05/1~9453^2~1656 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d33ef936c3c4673112d0fa91a3d9e507b97be663;p=openembedded.git sanity.bbclass: make it work even when distutils is not available --- diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index 8253b27930..a06753b198 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -31,7 +31,10 @@ def check_app_exists(app, d): def check_sanity(e): from bb import note, error, data, __version__ from bb.event import Handled, NotHandled, getName - from distutils.version import LooseVersion + try: + from distutils.version import LooseVersion + except ImportError: + def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1 import os # Check the bitbake version meets minimum requirements