mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 14:41:23 -07:00
Remove debug lock
This commit is contained in:
parent
972dc3fc97
commit
37f721f315
2 changed files with 0 additions and 11 deletions
|
@ -39,7 +39,6 @@ import traceback
|
||||||
|
|
||||||
# for debug
|
# for debug
|
||||||
from multiprocessing import Lock
|
from multiprocessing import Lock
|
||||||
debug_lock = Lock()
|
|
||||||
|
|
||||||
import ansible.constants as C
|
import ansible.constants as C
|
||||||
from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
|
from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError
|
||||||
|
|
|
@ -37,14 +37,6 @@ from ansible.errors import AnsibleError
|
||||||
from ansible.utils.color import stringc
|
from ansible.utils.color import stringc
|
||||||
from ansible.utils.unicode import to_bytes, to_unicode
|
from ansible.utils.unicode import to_bytes, to_unicode
|
||||||
|
|
||||||
try:
|
|
||||||
from __main__ import debug_lock
|
|
||||||
except ImportError:
|
|
||||||
# for those not using a CLI, though ...
|
|
||||||
# this might not work well after fork
|
|
||||||
from multiprocessing import Lock
|
|
||||||
debug_lock = Lock()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Python 2
|
# Python 2
|
||||||
input = raw_input
|
input = raw_input
|
||||||
|
@ -184,9 +176,7 @@ class Display:
|
||||||
|
|
||||||
def debug(self, msg):
|
def debug(self, msg):
|
||||||
if C.DEFAULT_DEBUG:
|
if C.DEFAULT_DEBUG:
|
||||||
debug_lock.acquire()
|
|
||||||
self.display("%6d %0.5f: %s" % (os.getpid(), time.time(), msg), color=C.COLOR_DEBUG)
|
self.display("%6d %0.5f: %s" % (os.getpid(), time.time(), msg), color=C.COLOR_DEBUG)
|
||||||
debug_lock.release()
|
|
||||||
|
|
||||||
def verbose(self, msg, host=None, caplevel=2):
|
def verbose(self, msg, host=None, caplevel=2):
|
||||||
# FIXME: this needs to be implemented
|
# FIXME: this needs to be implemented
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue