lava_wait_jobs.py: Print exception traceback in case of retries

Current retries on the level of main() are very crude and often don't
help, as when restarting from the very beginning there's a high chance
that another issue (e.g. a timeout) occurs. To help to investigate
how to perform retries in a better manner, add this additional logging.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I8ce77e5e52b07667a7096aaf98fd5d1eceb4e596
diff --git a/lava_helper/lava_wait_jobs.py b/lava_helper/lava_wait_jobs.py
index 51b7e97..30d49bb 100755
--- a/lava_helper/lava_wait_jobs.py
+++ b/lava_helper/lava_wait_jobs.py
@@ -20,6 +20,7 @@
 import yaml
 import argparse
 import shutil
+import traceback
 from jinja2 import Environment, FileSystemLoader
 from lava_helper import test_lava_dispatch_credentials
 from lava_submit_jobs import submit_lava_jobs
@@ -184,6 +185,7 @@
         except Exception as e:
             if try_time < 2:
                 print("Exception in wait_for_jobs: {!r}".format(e))
+                traceback.print_exception(type(e), e, e.__traceback__)
                 print("Trying to get LAVA jobs again...")
             else:
                 raise e