diff options
author | fmenguy <francoisregis.menguy@orange.com> | 2020-08-24 16:00:01 +0200 |
---|---|---|
committer | fmenguy <francoisregis.menguy@orange.com> | 2020-08-24 16:04:06 +0200 |
commit | dbb932797aff64d458231519d3cf245913913d67 (patch) | |
tree | 6e3d0571e21d98cb116d87bbbdd65eaa9e9d311c /nfvbench/utils.py | |
parent | 259a75b97d735cff6cfc91c12bf84801c9dc992b (diff) |
NFVBENCH-175 pylint w0707 correction
Change-Id: I16927f051f80c540ffc1989f5311e47e68b14a73
Signed-off-by: fmenguy <francoisregis.menguy@orange.com>
Diffstat (limited to 'nfvbench/utils.py')
-rw-r--r-- | nfvbench/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nfvbench/utils.py b/nfvbench/utils.py index b92c75e..06f643c 100644 --- a/nfvbench/utils.py +++ b/nfvbench/utils.py @@ -166,7 +166,7 @@ def parse_flow_count(flow_count): try: flow_count = int(flow_count) except ValueError: - raise Exception("Unknown flow count format '{}'".format(input_fc)) + raise Exception("Unknown flow count format '{}'".format(input_fc)) from ValueError return flow_count * multiplier @@ -190,8 +190,8 @@ class RunLock(object): try: self._fd = os.open(self._path, os.O_CREAT) fcntl.flock(self._fd, fcntl.LOCK_EX | fcntl.LOCK_NB) - except (OSError, IOError): - raise Exception('Other NFVbench process is running. Please wait') + except (OSError, IOError) as e: + raise Exception('Other NFVbench process is running. Please wait') from e def __exit__(self, *args): fcntl.flock(self._fd, fcntl.LOCK_UN) |