Commit Graph

11 Commits (23ebb98570a54123040e1d2ed17df09b7ae3ca63)

Author SHA1 Message Date
James Cammarata b75f305079 Ensure async wrapper and status return consistent fields 8 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.
8 years ago
Brian Coca a1e6311197 reverted need for module utils imports 8 years ago
Brian Coca ab4ec24813 added missing import
readded raise
8 years ago
Brian Coca 4a0c483e09 exception ans sys.exit fixes 8 years ago
Toshio Kuratomi f9b28aaae3 Fix exception handling in async_wrapper 8 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
8 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).
8 years ago
Toshio Kuratomi 6e5b09f3a8 Allow async to not need an args file since new-style modules have args embedded 9 years ago
Brian Coca d192e2c3e3 code cleanup and reoorg, renamed vars and functions to actual purpose
reneabled logging of steps
9 years ago
Michael DeHaan cec519f70e Move internal category to utilities to remove one more category from the left hand menu, keeping it concise. 10 years ago