-----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJZOEwkAAoJEJykq7OBq3PIZIIH/3N2V2ItkeH9dFuw5kvztnIS Zcx9SeALpk0ABx90R363h+UYip0pnVXDizf8v/4U2gPqmg8hO26nGuetO9O5E3mf 4sRdaw/VRF5rJUTSnyZBya/7xW5vzZYgIo+97Szv27XI5RgxRGjA6YI+Yly8EoMB Gn3WRaVpI5fZGprQj24FWus3lNZWf93YPdMuvPWfwZ/jZNU6M0JybmuU/9ci+79T 9twwT7Stp3qTirjokw23NjHaTc/T+xDUJzSBygfEuPCwCYwQKtb0vV3uepHylsup ZNb/XNS3D8ToQKbbGb0XIdczu/QRy70Y6dCTAMcP+FWns3jKX64Zl+mlOtZqvs4= =BhOr -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging # gpg: Signature made Wed 07 Jun 2017 19:55:32 BST # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/tracing-pull-request: simpletrace: Improve the error message if event is not declared Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
5093f028ce
@ -42,7 +42,15 @@ def get_record(edict, idtoname, rechdr, fobj):
|
||||
event_id = rechdr[0]
|
||||
name = idtoname[event_id]
|
||||
rec = (name, rechdr[1], rechdr[3])
|
||||
event = edict[name]
|
||||
try:
|
||||
event = edict[name]
|
||||
except KeyError, e:
|
||||
import sys
|
||||
sys.stderr.write('%s event is logged but is not declared ' \
|
||||
'in the trace events file, try using ' \
|
||||
'trace-events-all instead.\n' % str(e))
|
||||
sys.exit(1)
|
||||
|
||||
for type, name in event.args:
|
||||
if is_string(type):
|
||||
l = fobj.read(4)
|
||||
|
Loading…
Reference in New Issue
Block a user