[OE-core] [PATCH 5/5] devtool: sdk-update: fix traceback without update server set
Paul Eggleton
paul.eggleton at linux.intel.com
Tue Dec 22 03:19:18 UTC 2015
If the SDK update server hasn't been set in the config (when building
the extensible SDK this would be set via SDK_UPDATE_URL) and it wasn't
specified on the command line then we were failing with a traceback
because we didn't pass the default value properly - None is interpreted
as no default, meaning raise an exception if no such option exists.
Additionally we don't need the try...except anymore either because with
a proper default value, NoSectionError is caught as well.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
scripts/lib/devtool/sdk.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index 85c0fb1..f08f0ee 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -81,13 +81,9 @@ def install_sstate_objects(sstate_objects, src_sdk, dest_sdk):
def sdk_update(args, config, basepath, workspace):
# Fetch locked-sigs.inc file from remote/local destination
- from ConfigParser import NoSectionError
updateserver = args.updateserver
if not updateserver:
- try:
- updateserver = config.get('SDK', 'updateserver', None)
- except NoSectionError:
- pass
+ updateserver = config.get('SDK', 'updateserver', '')
if not updateserver:
raise DevtoolError("Update server not specified in config file, you must specify it on the command line")
logger.debug("updateserver: %s" % args.updateserver)
--
2.5.0
More information about the Openembedded-core
mailing list