From: Michael Lauer Date: Sun, 16 Apr 2006 21:15:39 +0000 (+0000) Subject: base class: make base_read_file not raise an exception if the file to read is not... X-Git-Tag: Release-2010-05/1~9453^2~1898^2~8^2~109 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2df0cdc8d8c8eb49eee79c8f82c5bcbf3676703d;p=openembedded.git base class: make base_read_file not raise an exception if the file to read is not present This is necessary due to the new RDEPENDS handling. I don't feel 100% comfortable with it, but until we rework the complete staging-shouldn't-contain-dependency-information, this is our way. --- diff --git a/classes/base.bbclass b/classes/base.bbclass index 340e5d91f8..a06c1c1905 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -27,7 +27,7 @@ def base_read_file(filename): try: f = file( filename, "r" ) except IOError, reason: - raise bb.build.FuncFailed("can't read from file '%s' (%s)", (filename,reason)) + return "" # WARNING: can't raise an error now because of the new RDEPENDS handling. This is a bit ugly. :M: else: return f.read().strip() return None