summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-12-22 16:19:18 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-28 09:25:12 +0000
commit2381f4a39464eb8075dbd5795d6a5f295c72bd4c (patch)
tree479c92cb2c6f292479035a6f269469bcbc90449d
parent7540550048507056c2d53a9af418968aa6fd93dc (diff)
downloadpoky-2381f4a39464eb8075dbd5795d6a5f295c72bd4c.tar.gz
devtool: sdk-update: fix traceback without update server set
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 rev: 9763c1b83362f8445ed6dff2804dd7d282861f79) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/devtool/sdk.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index 85c0fb1729..f08f0eee7c 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):
81 81
82def sdk_update(args, config, basepath, workspace): 82def sdk_update(args, config, basepath, workspace):
83 # Fetch locked-sigs.inc file from remote/local destination 83 # Fetch locked-sigs.inc file from remote/local destination
84 from ConfigParser import NoSectionError
85 updateserver = args.updateserver 84 updateserver = args.updateserver
86 if not updateserver: 85 if not updateserver:
87 try: 86 updateserver = config.get('SDK', 'updateserver', '')
88 updateserver = config.get('SDK', 'updateserver', None)
89 except NoSectionError:
90 pass
91 if not updateserver: 87 if not updateserver:
92 raise DevtoolError("Update server not specified in config file, you must specify it on the command line") 88 raise DevtoolError("Update server not specified in config file, you must specify it on the command line")
93 logger.debug("updateserver: %s" % args.updateserver) 89 logger.debug("updateserver: %s" % args.updateserver)