Skip to content

Commit dc886ee

Browse files
committed
treat integer separately
1 parent 37a2560 commit dc886ee

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tools/src/main/python/opengrok_tools/utils/commandsequence.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,13 @@ def __init__(self, call_dict):
138138
self.api_timeout = None
139139
call_timeout = call_dict.get(API_TIMEOUT_PROPERTY)
140140
if call_timeout:
141-
if call_timeout.startswith("$"):
142-
call_timeout = os.environ.get(call_timeout[1:], "")
143-
if call_timeout.isdigit():
144-
self.api_timeout = int(call_timeout)
141+
if isinstance(call_timeout, str):
142+
if call_timeout.startswith("$"):
143+
call_timeout = os.environ.get(call_timeout[1:], "")
144+
if call_timeout.isdigit():
145+
self.api_timeout = int(call_timeout)
146+
else:
147+
self.api_timeout = call_timeout
145148

146149
self.async_api_timeout = None
147150
call_api_timeout = call_dict.get(ASYNC_API_TIMEOUT_PROPERTY)

0 commit comments

Comments
 (0)