validate:launcher: Generate profiling data even if an exception happens

This commit is contained in:
Thibault Saunier 2020-01-08 09:23:19 -03:00
parent bc622ec658
commit eda925a334

View file

@ -70,8 +70,10 @@ if "__main__" == __name__:
if run_profile:
import cProfile
prof = cProfile.Profile()
res = prof.runcall(main, libsdir)
prof.dump_stats('gst-validate-launcher-runstats')
try:
res = prof.runcall(main, libsdir)
finally:
prof.dump_stats('gst-validate-launcher-runstats')
exit(res)
exit(main(libsdir))