Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 32bbc36

Browse filesBrowse files
miss-islingtonbasbloemsaatkgdiem
authored
[3.12] gh-99242 Ignore error when running regression tests under certain conditions. (GH-121663) (GH-121670)
gh-99242 Ignore error when running regression tests under certain conditions. (GH-121663) (cherry picked from commit 0759cec) Co-authored-by: Bas Bloemsaat <bas@bloemsaat.com> Co-authored-by: Kevin Diem <kg.diem@gmail.com>
1 parent 0ec761a commit 32bbc36
Copy full SHA for 32bbc36

File tree

2 files changed

+7
-1
lines changed
Filter options

2 files changed

+7
-1
lines changed

‎Lib/test/libregrtest/logger.py

Copy file name to clipboardExpand all lines: Lib/test/libregrtest/logger.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ def log(self, line: str = '') -> None:
4343

4444
def get_load_avg(self) -> float | None:
4545
if hasattr(os, 'getloadavg'):
46-
return os.getloadavg()[0]
46+
try:
47+
return os.getloadavg()[0]
48+
except OSError:
49+
pass
4750
if self.win_load_tracker is not None:
4851
return self.win_load_tracker.getloadavg()
4952
return None
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:func:`os.getloadavg` may throw :exc:`OSError` when running regression tests
2+
under certain conditions (e.g. chroot). This error is now caught and
3+
ignored, since reporting load average is optional.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.