Commit Graph

11 Commits (f7bd0f4dfb5aa809c6772d9e303ce05e2f7d8c1c)

Author SHA1 Message Date
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