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:
Jeremy Kerr <jk@codeconstruct.com.au>
Change-Id: Iae6b92383af4fe49770e77005fcb575faa125703
Loading
Please register or sign in to comment