]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: sdk-update: fix traceback without update server set
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 22 Dec 2015 03:19:18 +0000 (16:19 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 Jan 2016 15:41:31 +0000 (15:41 +0000)
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.

(From OE-Core master rev: 9763c1b83362f8445ed6dff2804dd7d282861f79)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/sdk.py

index 7a842afc24894831ca66e3d6a1014a5f17deafed..84b9f32a57cfa86b62038767729392e62fa66e3c 100644 (file)
@@ -85,13 +85,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)