@@ -579,7 +579,7 @@ def obtain_config(top_dir, registry, args, source_overrides, d):
json_data = json.load(f)
upstream_config = {'type':'network','uri':config_id,'name':get_config_name(config_id),'data':json_data}
except json.JSONDecodeError as e:
- raise Exception ("Invalid JSON from {}. Are you pointing to an HTML page? {}".format(config_id, e))
+ raise Exception ("Invalid JSON from {}. Are you pointing to an HTML page? {}".format(config_id, e)) from e
else:
logger.info("Looking up config {} in configuration registry".format(config_id))
registry_path = update_registry(registry, cache_dir(top_dir), d)
Chain the exceptions so that it is easier to trace the exception back to its root cause. This resolves B904 linting issues from flake8-bugbear. Signed-off-by: Rob Woolley <rob.woolley@windriver.com> --- bin/bitbake-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)