Skip to content
Permalink
Browse files

Don't abort dumping tokens after a failure.

  • Loading branch information...
marmistrz authored and superm1 committed Jun 2, 2019
1 parent b029460 commit 43a9be10d38ea8bc69afea7d7a51e6c042541859
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/bin/smbios-token-ctl
@@ -5,6 +5,7 @@
#
# Copyright (c) 2005 Dell Computer Corporation
# Dual Licenced under GNU GPL and OSL
# Contributor: (c) 2019 Marcin Mielniczuk <marmistrz dot dev at zoho dot eu>
#
#############################################################################
"""smbios-token-ctl"""
@@ -229,6 +230,8 @@ def dumpTokens(tokenTable, tokenXlator, options):
print(_(" value: %s = %s") % (type, cli.makePrintable(value)))
except RuntimeError as e:
pass
except smbios_token.TokenManipulationFailure as e:
print(f" value: token query failed: {e}")

desc = _(" Desc: ")
sys.stdout.write(desc)
@@ -424,6 +427,8 @@ def main():
verboseLog.info( _("The token library returned this error:") )
verboseLog.info( str(e) )
moduleLog.info( cli.standardFailMessage )
except StopIteration:
pass

return exit_code

@@ -468,4 +473,3 @@ INTERNAL_BLACKLIST = \

if __name__ == "__main__":
sys.exit( main() )

0 comments on commit 43a9be1

Please sign in to comment.
You can’t perform that action at this time.