Skip to content

Commit a4e235d

Browse files
author
saiprasannasastry
committed
This commit contains changes that takes care when user enters a
wapi version above 2.9.Examle :2.10. previously we were using string.digits which was taking value between "0-9". so when a value of "10" or above was entered we were getting error
1 parent c40b562 commit a4e235d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

infoblox_client/feature.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
# under the License.
1515

1616
import six
17-
import string
1817

1918
from infoblox_client import exceptions as ib_ex
2019

@@ -99,7 +98,7 @@ def _get_wapi_version_parts(version):
9998
if (not parts or len(parts) > 3 or len(parts) < 2):
10099
raise ValueError("Invalid argument was passed")
101100
for p in parts:
102-
if not len(p) or p not in string.digits:
101+
if not len(p) or not p.isdigit():
103102
raise ValueError("Invalid argument was passed")
104103
parts = [int(x) for x in parts]
105104
if len(parts) == 2:

0 commit comments

Comments
 (0)