From c16a74b96223cfb7bf3b6277b8c0b46c18f671fe Mon Sep 17 00:00:00 2001 From: Maria Malyarova Date: Fri, 15 Jul 2016 16:11:13 +0300 Subject: [PATCH] Simplified if statement Simplification of checking the value "got" to the limits "get_common_version" TrivialFix Change-Id: If233b5f1e3162fde74e63e83e015be585d395ba2 --- os_vif/objects/host_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_vif/objects/host_info.py b/os_vif/objects/host_info.py index 50a6a8a5..b898e2f2 100644 --- a/os_vif/objects/host_info.py +++ b/os_vif/objects/host_info.py @@ -54,7 +54,7 @@ class HostVIFInfo(osv_base.VersionedObject, base.ComparableVersionedObject): minwant = _vers_tuple(self.min_version) maxwant = _vers_tuple(self.max_version) - if got >= minwant and got <= maxwant: + if minwant <= got <= maxwant: return regobj.VERSION raise exception.NoSupportedVIFVersion(vif_name=self.name,