Commit Graph

17 Commits (c6d8cb6cab9fdfd9cd382048bbf419dfbc2dc164)

Author SHA1 Message Date
Matt Davis 18f710fe32 add JSON junk filter to async_wrapper (#5107) 9 years ago
Brian Coca da0dac3841 removed chdir / as it breaks tasks
fixes #17466
9 years ago
Monty Taylor 6ba5dc3188 Don't change to root dir in async_wrapper (#4779)
The daemonizing code here is taken from an ActiveState recipe, which
includes changing to / as a general best practice. While that is
normally true to allow for deleting the directory that the daemon
process started in, in this case it is not relevant as this is not
intended to be an actual long-running daemon.

Issue ansible/ansible#17466
9 years ago
Matt Clay 982c4557d2 Python 3 fixes for async_wrapper and async_status. (#4671) 9 years ago
Matt Clay 05c6707a32 Make async_wrapper ignore '_' as an argsfile. (#4678)
This provides support for passing additional positional parameters to async_wrapper.
Additional parameters will be used by the upcoming async support for Windows.
9 years ago
James S. Martin 978716cf4c Shows messages for uncaught exceptions from called modules in async_wrapper output. (#4591) 9 years ago
James Cammarata b75f305079 Ensure async wrapper and status return consistent fields 10 years ago
David Shrewsbury 4e239f6ce0 Use os.rename() in async_wrapper
Because the async_status module will read from the same file that
the async_wrapper module is writing, it's possible that the file
may not be fully synced during a read, causing spurious failures.
Use a temp file to do an atomic operation on the file. We can't
use atomic_move() here as that doesn't work properly under async.

Also, let's not read concurrently from the same file the subprocess
is writing to. Instead, capture stdout/stderr via PIPE and write to
the file to avoid nasty races.
10 years ago
Brian Coca a1e6311197 reverted need for module utils imports 10 years ago
Brian Coca ab4ec24813 added missing import
readded raise
10 years ago
Brian Coca 4a0c483e09 exception ans sys.exit fixes 10 years ago
Toshio Kuratomi f9b28aaae3 Fix exception handling in async_wrapper 10 years ago
Brano Zarnovican 3456c24b96 Py2.4: SystemExit in async_wrapper is not an error - compatibility fix
Prior to Python 2.5, SystemExit was a subclass of Exception.
In Py2.4, this is causing extra error output on valid sys.exit(0).

(Toshio) Call sys.exit from inside of the SystemExit exception handler so py2.4 and py2.5+ behaviour matches
10 years ago
codemeup @ Work 1e0bb94ced Fixing compile time errors irt (, e => as e, print(), ocat now 0o not 0) exception handling for Python 3 (#3851)
* Fixing compile time errors irt a) exception handling for Python 3 in util, also: b) problem octal usage (fixed) and c) print json_dump -> print(json_dump(xyz) ... et al

* This code was not Python 2.4 compliant. Octal codes and exception handling is now working with Py 2.4, 2.6, & 3.5.

* Fixing formating (or rather reverting an non 2.4 compatible change). Works in compile & runtime checking.

* a) revert to use print sys.stderr not fail_json; b) fixed var name in exception

* Python 3 compatible print (print >>sys.stderr will generate a TypeError - now uses sys.stderr.write instead).
10 years ago
Toshio Kuratomi 6e5b09f3a8 Allow async to not need an args file since new-style modules have args embedded 10 years ago
Brian Coca d192e2c3e3 code cleanup and reoorg, renamed vars and functions to actual purpose
reneabled logging of steps
10 years ago
Michael DeHaan cec519f70e Move internal category to utilities to remove one more category from the left hand menu, keeping it concise. 11 years ago