diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-08 17:30:45 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-10 23:37:18 +0000 |
commit | 43b9d70bbad02495af54014a25611f8e0d78d6bf (patch) | |
tree | 8958e3ca08702783873e6f2cc420f0c102b37af1 /lib/bb/fetch2/__init__.py | |
parent | 25204a6a816a6c8c4cbe2debea5f669d09f82af3 (diff) | |
download | bitbake-43b9d70bbad02495af54014a25611f8e0d78d6bf.tar.gz |
bitbake/fetch2: Ignore UnboundLocalError in exception handler in try_mirror
(From Poky rev: aa45760702e874977454778659c205b29d1ff049)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/__init__.py')
-rw-r--r-- | lib/bb/fetch2/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 8e35f5487..ee3476bcc 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -448,8 +448,11 @@ def try_mirrors(d, origud, mirrors, check = False): except bb.fetch2.BBFetchException: logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url)) - if os.path.isfile(ud.localpath): - bb.utils.remove(ud.localpath) + try: + if os.path.isfile(ud.localpath): + bb.utils.remove(ud.localpath) + except UnboundLocalError: + pass continue return None |