Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import queue from six.moves for python3 compatibility. #10692

Merged
merged 1 commit into from
Apr 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions v2/ansible/executor/process/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import Queue
from six.moves import queue
import multiprocessing
import os
import signal
Expand Down Expand Up @@ -77,7 +77,7 @@ def _read_worker_result(self):
result = rslt_q.get(block=False)
debug("got a result from worker %d: %s" % (self._cur_worker, result))
break
except Queue.Empty:
except queue.Empty:
pass

if self._cur_worker == starting_point:
Expand Down Expand Up @@ -164,7 +164,7 @@ def run(self):
if result._task.register:
self._send_result(('set_host_var', result._host, result._task.register, result._result))

except Queue.Empty:
except queue.Empty:
pass
except (KeyboardInterrupt, IOError, EOFError):
break
Expand Down
4 changes: 2 additions & 2 deletions v2/ansible/executor/process/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type

import Queue
from six.moves import queue
import multiprocessing
import os
import signal
Expand Down Expand Up @@ -130,7 +130,7 @@ def run(self):
else:
time.sleep(0.1)

except Queue.Empty:
except queue.Empty:
pass
except (IOError, EOFError, KeyboardInterrupt):
break
Expand Down