[NFVBENCH-62] Add support for non-openstack environments
[nfvbench.git] / nfvbench / specs.py
index 7a24d5c..a84a55f 100644 (file)
@@ -75,7 +75,8 @@ class OpenStackSpec(object):
 
 class RunSpec(object):
     def __init__(self, no_vswitch_access, openstack_spec):
-        self.use_vswitch = (not no_vswitch_access) and openstack_spec.vswitch != "BASIC"
+        self.use_vswitch = (not no_vswitch_access) and openstack_spec \
+            and openstack_spec.vswitch != "BASIC"
 
 
 class Specs(object):