Patchwork [bitbake-devel,02/14] fetch2: Fix error handling in uri_replace()

login
register
mail settings
Submitter Richard Purdie
Date June 20, 2012, 2:12 p.m.
Message ID <1bfba28a583cb167f60e05ecdf34d0786dc1eec5.1340200207.git.richard.purdie@linuxfoundation.org>
Download mbox | patch
Permalink /patch/30299/
State New
Headers show

Comments

Richard Purdie - June 20, 2012, 2:12 p.m.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 bitbake/lib/bb/fetch2/__init__.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 73ac73a..067d60c 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -184,7 +184,8 @@  def encodeurl(decoded):
 
 def uri_replace(ud, uri_find, uri_replace, d):
     if not ud.url or not uri_find or not uri_replace:
-        logger.debug(1, "uri_replace: passed an undefined value, not replacing")
+        logger.error("uri_replace: passed an undefined value, not replacing")
+        return None
     uri_decoded = list(decodeurl(ud.url))
     uri_find_decoded = list(decodeurl(uri_find))
     uri_replace_decoded = list(decodeurl(uri_replace))