From 93426ff6aca09140f4bd5ee31cbbc97fa42a80df Mon Sep 17 00:00:00 2001 From: Avasam Date: Tue, 30 Jan 2024 10:49:01 -0500 Subject: [PATCH] Fix passing float to range in win32pdhquery.Query.collectdatafor (#2170) --- win32/Lib/win32pdhquery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32/Lib/win32pdhquery.py b/win32/Lib/win32pdhquery.py index 75f019a77..bda1665f0 100644 --- a/win32/Lib/win32pdhquery.py +++ b/win32/Lib/win32pdhquery.py @@ -496,7 +496,7 @@ def collectdatafor(self, totalperiod, period=1): tempresults = [] try: self.open() - for ind in range(totalperiod / period): + for ind in range(int(totalperiod / period)): tempresults.append(self.collectdata()) time.sleep(period) self.curresults = tempresults