Bug 1261873 - windows 7 cpu/mem counters are showing up as values of 0 after changing the process names. r?wlach
MozReview-Commit-ID: Dq656v5Zjks
--- a/testing/talos/talos/cmanager_win32.py
+++ b/testing/talos/talos/cmanager_win32.py
@@ -33,23 +33,23 @@ def _getExpandedCounterPaths(processName
'''
pcchPathListLength = DWORD(0)
szWildCardPath = LPSTR('\\process(%s)\\%s' % (processName, counterName))
if pdh.PdhExpandCounterPathA(
szWildCardPath,
LPSTR(None),
pointer(pcchPathListLength)
) != _PDH_MORE_DATA:
- return None
+ return []
pathListLength = pcchPathListLength.value
szExpandedPathList = LPCSTR('\0' * pathListLength)
if pdh.PdhExpandCounterPathA(szWildCardPath, szExpandedPathList,
pointer(pcchPathListLength)) != 0:
- return None
+ return []
buffer = create_string_buffer(pcchPathListLength.value)
memmove(buffer, szExpandedPathList, pcchPathListLength.value)
paths = []
i = 0
path = ''
for j in range(0, pcchPathListLength.value):
c = struct.unpack_from('c', buffer, offset=j)[0]