Skip to content
Commit b1475015 authored by Jeremy Kerr's avatar Jeremy Kerr Committed by ManojKiran Eda
Browse files

tools: fw-update: Don't wrap datetime parsing in a catch KeyError block



Currently, all of the datetime parse is wrapped in a `catch KeyError`
block. However, the only part of this that would raise a KeyError is
where we extract the PackageReleaseDateTime from the metadata dict.

Instead, just do the key lookup separately, and parse outside of the
catch block.

Then, since we're handling a default anyway, just use .get() and then we
don't need to catch the KeyError.

Signed-off-by: default avatarJeremy Kerr <jk@codeconstruct.com.au>
Change-Id: Iae6b92383af4fe49770e77005fcb575faa125703
parent b0ba34d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment