diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/recipetool/create.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index f7b0676f32..f8701d401e 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -336,10 +336,16 @@ def supports_srcrev(uri): # odd interactions with the urldata cache which lead to errors localdata.setVar('SRCREV', '${AUTOREV}') bb.data.update_data(localdata) - fetcher = bb.fetch2.Fetch([uri], localdata) - urldata = fetcher.ud - for u in urldata: - if urldata[u].method.supports_srcrev(): + try: + fetcher = bb.fetch2.Fetch([uri], localdata) + urldata = fetcher.ud + for u in urldata: + if urldata[u].method.supports_srcrev(): + return True + except bb.fetch2.FetchError as e: + logger.debug('FetchError in supports_srcrev: %s' % str(e)) + # Fall back to basic check + if uri.startswith(('git://', 'gitsm://')): return True return False |