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>2016-01-15 15:51:40 +0000
commita897bfdbdc23ecc324f6a9edac783e780beff964 (patch)
tree9ae09d98423eda90aa207937ab2d6d048d0772c3
parent9c4b61e919dddf8db297cfd49edeebd98f755a93 (diff)
downloadpoky-a897bfdbdc23ecc324f6a9edac783e780beff964.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 master rev: 9763c1b83362f8445ed6dff2804dd7d282861f79) (From OE-Core rev: b2696869c1428e8ef2a198d2432121ddc2e2034c) 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 7a842afc24..84b9f32a57 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -85,13 +85,9 @@ def install_sstate_objects(sstate_objects, src_sdk, dest_sdk):
85 85
86def sdk_update(args, config, basepath, workspace): 86def sdk_update(args, config, basepath, workspace):
87 # Fetch locked-sigs.inc file from remote/local destination 87 # Fetch locked-sigs.inc file from remote/local destination
88 from ConfigParser import NoSectionError
89 updateserver = args.updateserver 88 updateserver = args.updateserver
90 if not updateserver: 89 if not updateserver:
91 try: 90 updateserver = config.get('SDK', 'updateserver', '')
92 updateserver = config.get('SDK', 'updateserver', None)
93 except NoSectionError:
94 pass
95 if not updateserver: 91 if not updateserver:
96 raise DevtoolError("Update server not specified in config file, you must specify it on the command line") 92 raise DevtoolError("Update server not specified in config file, you must specify it on the command line")
97 logger.debug("updateserver: %s" % args.updateserver) 93 logger.debug("updateserver: %s" % args.updateserver)