aboutsummaryrefslogtreecommitdiffstats
path: root/nfvbench/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'nfvbench/utils.py')
-rw-r--r--nfvbench/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/nfvbench/utils.py b/nfvbench/utils.py
index 4d9749c..fc72517 100644
--- a/nfvbench/utils.py
+++ b/nfvbench/utils.py
@@ -17,6 +17,7 @@ import fcntl
from functools import wraps
import json
from log import LOG
+from math import isnan
import os
import re
import signal
@@ -141,6 +142,10 @@ def parse_flow_count(flow_count):
return flow_count * multiplier
+def cast_integer(value):
+ return int(value) if not isnan(value) else value
+
+
class RunLock(object):
"""
Attempts to lock file and run current instance of NFVbench as the first,