[NFVBENCH-89] Fix exception losing original tracebacks 25/56725/1
authorahothan <ahothan@cisco.com>
Fri, 27 Apr 2018 01:32:27 +0000 (18:32 -0700)
committerahothan <ahothan@cisco.com>
Fri, 27 Apr 2018 01:32:27 +0000 (18:32 -0700)
Change-Id: I7e94d6209603c622fc0a0ea22fdd21ea09f1bbaa
Signed-off-by: ahothan <ahothan@cisco.com>
.gitignore
nfvbench/chain_managers.py
nfvbench/traffic_gen/trex.py

index 322c5b2..8842f79 100644 (file)
@@ -4,6 +4,7 @@
 .tox
 .cache
 .eggs
+.pytest_cache/
 venv
 nfvbench.egg-info
 nfvbenchvm/dib/dib-venv
index ab340bf..211f9bb 100644 (file)
@@ -90,11 +90,11 @@ class PVPStatsManager(object):
         try:
             self.worker.set_vlans(self.vlans)
             self._config_interfaces()
-        except Exception as exc:
+        except Exception:
             # since the wrorker is up and running, we need to close it
             # in case of exception
             self.close()
-            raise exc
+            raise
 
     def _get_data(self):
         return self.worker.get_data() if self.worker else {}
index c468802..22ca4d9 100644 (file)
@@ -251,7 +251,7 @@ class TRex(AbstractTrafficGenerator):
                 break
             except Exception as ex:
                 if it == (self.config.generic_retry_count - 1):
-                    raise ex
+                    raise
                 LOG.info("Retrying connection to TRex (%s)...", ex.message)
 
     def connect(self):