Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a92941ff
Commit
a92941ff
authored
Sep 19, 2017
by
Victor Stinner
Committed by
GitHub
Sep 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pythoninfo: ignore OSError(ENOSYS) on getrandom() (#3655)
parent
865e4b4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
Lib/test/pythoninfo.py
Lib/test/pythoninfo.py
+12
-5
No files found.
Lib/test/pythoninfo.py
View file @
a92941ff
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
Collect various informations about Python to help debugging test failures.
Collect various informations about Python to help debugging test failures.
"""
"""
from
__future__
import
print_function
from
__future__
import
print_function
import
errno
import
re
import
re
import
sys
import
sys
import
traceback
import
traceback
...
@@ -223,11 +224,17 @@ def collect_os(info_add):
...
@@ -223,11 +224,17 @@ def collect_os(info_add):
if hasattr(os, '
getrandom
'):
if hasattr(os, '
getrandom
'):
# PEP 524: Check if system urandom is initialized
# PEP 524: Check if system urandom is initialized
try:
try:
os.getrandom(1, os.GRND_NONBLOCK)
try:
state = '
ready
(
initialized
)
'
os.getrandom(1, os.GRND_NONBLOCK)
except BlockingIOError as exc:
state = '
ready
(
initialized
)
'
state = '
not
seeded
yet
(
%
s
)
' % exc
except BlockingIOError as exc:
info_add('
os
.
getrandom
', state)
state = '
not
seeded
yet
(
%
s
)
' % exc
info_add('
os
.
getrandom
', state)
except OSError as exc:
# Python was compiled on a more recent Linux version
# than the current Linux kernel: ignore OSError(ENOSYS)
if exc.errno != errno.ENOSYS:
raise
def collect_readline(info_add):
def collect_readline(info_add):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment