mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixing up some non-py3 things for unit tests
This commit is contained in:
parent
35015aaa4a
commit
6312e38133
2 changed files with 2 additions and 2 deletions
|
@ -99,7 +99,7 @@ class TaskQueueManager:
|
||||||
def _initialize_processes(self, num):
|
def _initialize_processes(self, num):
|
||||||
self._workers = []
|
self._workers = []
|
||||||
|
|
||||||
for i in xrange(num):
|
for i in range(num):
|
||||||
main_q = multiprocessing.Queue()
|
main_q = multiprocessing.Queue()
|
||||||
rslt_q = multiprocessing.Queue()
|
rslt_q = multiprocessing.Queue()
|
||||||
self._workers.append([None, main_q, rslt_q])
|
self._workers.append([None, main_q, rslt_q])
|
||||||
|
|
|
@ -169,7 +169,7 @@ def add_host_key(module, fqdn, key_type="rsa", create_dir=False):
|
||||||
if not os.path.exists(user_ssh_dir):
|
if not os.path.exists(user_ssh_dir):
|
||||||
if create_dir:
|
if create_dir:
|
||||||
try:
|
try:
|
||||||
os.makedirs(user_ssh_dir, 0700)
|
os.makedirs(user_ssh_dir, 0o700)
|
||||||
except:
|
except:
|
||||||
module.fail_json(msg="failed to create host key directory: %s" % user_ssh_dir)
|
module.fail_json(msg="failed to create host key directory: %s" % user_ssh_dir)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue