Skip to content

Commit 7334e8e

Browse files
authored
Update splunkversioncontrol_utility.py
As per #28
1 parent fa3b2e3 commit 7334e8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/splunkversioncontrol_utility.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def runOSProcess(command, logger, timeout=60, shell=True):
3535
finally:
3636
timer.cancel()
3737

38-
if not timer.isAlive():
38+
# As per https://github.com/gjanders/SplunkVersionControl/issues/28
39+
if not getattr(timer, "isAlive", getattr(timer, "is_alive"))(): # Compatibility with >py3.8
3940
res = False
4041
logger.warn("OS process timed out after %s seconds, for command %s" % (timeout, command))
4142
proc.terminate()

0 commit comments

Comments
 (0)