Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
a1751686
Commit
a1751686
authored
Oct 03, 2014
by
Bruce Pennypacker
Committed by
James Cammarata
Oct 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atfork import warning should be suppressed when system_warnings = False
Fixes #9247
parent
b54434c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
lib/ansible/runner/__init__.py
+21
-3
No files found.
lib/ansible/runner/__init__.py
View file @
a1751686
...
...
@@ -32,6 +32,7 @@ import pipes
import
jinja2
import
subprocess
import
getpass
import
warnings
import
ansible.constants
as
C
import
ansible.inventory
...
...
@@ -49,6 +50,7 @@ from ansible.module_common import ModuleReplacer
from
ansible.module_utils.splitter
import
split_args
,
unquote
from
ansible.cache
import
FactCache
from
ansible.utils
import
update_hash
from
ansible.utils.display_functions
import
*
module_replacer
=
ModuleReplacer
(
strip_comments
=
False
)
...
...
@@ -59,10 +61,26 @@ except ImportError:
HAS_ATFORK
=
True
try
:
from
Crypto.Random
import
atfork
# some versions of pycrypto may not have this?
from
Crypto.pct_warnings
import
PowmInsecureWarning
except
ImportError
:
HAS_ATFORK
=
False
PowmInsecureWarning
=
RuntimeWarning
with
warnings
.
catch_warnings
(
record
=
True
)
as
warning_handler
:
warnings
.
simplefilter
(
"error"
,
PowmInsecureWarning
)
try
:
from
Crypto.Random
import
atfork
except
PowmInsecureWarning
:
system_warning
(
"The version of gmp you have installed has a known issue regarding "
+
\
"timing vulnerabilities when used with pycrypto. "
+
\
"If possible, you should update it (ie. yum update gmp)."
)
warnings
.
resetwarnings
()
warnings
.
simplefilter
(
"ignore"
)
HAS_ATFORK
=
False
except
ImportError
:
HAS_ATFORK
=
False
multiprocessing_runner
=
None
OUTPUT_LOCKFILE
=
tempfile
.
TemporaryFile
()
...
...
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