Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(973)

Unified Diff: build/toolchain/get_concurrent_links.py

Issue 929183002: Fixed several pylint warnings on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: silent on mac sysctl error, ignore vs_path Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/toolchain/win/setup_toolchain.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/get_concurrent_links.py
diff --git a/build/toolchain/get_concurrent_links.py b/build/toolchain/get_concurrent_links.py
index 629d67d5030662c94bf3ea89cb4915f8e0d47ebe..6a401017eb75555bc9b72c3a649da1bf59a8d6a1 100644
--- a/build/toolchain/get_concurrent_links.py
+++ b/build/toolchain/get_concurrent_links.py
@@ -7,6 +7,7 @@
import os
import re
+import subprocess
import sys
def GetDefaultConcurrentLinks():
@@ -31,8 +32,7 @@ def GetDefaultConcurrentLinks():
("sullAvailExtendedVirtual", ctypes.c_ulonglong),
]
- stat = MEMORYSTATUSEX()
- stat.dwLength = ctypes.sizeof(stat)
+ stat = MEMORYSTATUSEX(dwLength=ctypes.sizeof(MEMORYSTATUSEX))
ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(stat))
mem_limit = max(1, stat.ullTotalPhys / (4 * (2 ** 30))) # total / 4GB
@@ -55,7 +55,7 @@ def GetDefaultConcurrentLinks():
# A static library debug build of Chromium's unit_tests takes ~2.7GB, so
# 4GB per ld process allows for some more bloat.
return max(1, avail_bytes / (4 * (2 ** 30))) # total / 4GB
- except:
+ except Exception:
return 1
else:
# TODO(scottmg): Implement this for other platforms.
« no previous file with comments | « no previous file | build/toolchain/win/setup_toolchain.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698