diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py
index ec32812..1cb86b7 100755
--- a/tests/hwsim/run-tests.py
+++ b/tests/hwsim/run-tests.py
@@ -459,7 +459,9 @@ def main():
                 traceback.print_exc()
                 result = "FAIL"
             except Exception, e:
+                import traceback
                 logger.info(e)
+                traceback.print_exc()
                 if args.loglevel == logging.WARNING:
                     print "Exception: " + str(e)
                 result = "FAIL"
