mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-10 15:10:55 +00:00
undertaker/python: ported to stderr messages
This commit is contained in:
parent
4d24e247aa
commit
17c0478240
@ -36,7 +36,7 @@ class Undertaker(object):
|
||||
buf = NamedTemporaryFile()
|
||||
try:
|
||||
subprocess.check_call([cls.undertakerexec, paths, '--batch',
|
||||
'--path'], stdout=buf)
|
||||
'--path'], stderr=buf)
|
||||
except subprocess.CalledProcessError as exc:
|
||||
return False
|
||||
|
||||
|
@ -32,15 +32,15 @@ TRAPSTOP() die "STOP signal caught, undertaker aborting."
|
||||
# first of all source the tomb core functions
|
||||
which tomb > /dev/null
|
||||
if [[ $? != 0 ]]; then
|
||||
print "$fg[red][!]$fg[white] Tomb command not found, operation aborted."; exit 1
|
||||
print "$fg[red][!]$fg[white] Tomb command not found, operation aborted." >&2; exit 1
|
||||
fi
|
||||
|
||||
key_found() {
|
||||
# $1 is "url"
|
||||
if option_is_set --batch; then
|
||||
print -n '[m]'
|
||||
print -n '[m]' >&2
|
||||
fi
|
||||
print "$fg[white][found] $1"
|
||||
print "$fg[white][found] $1" >&2
|
||||
}
|
||||
|
||||
|
||||
@ -162,8 +162,8 @@ function main() {
|
||||
typeset -A opts
|
||||
zparseopts -M -E -D -Aopts -poll -path -batch
|
||||
if ! [ $1 ] ; then
|
||||
echo "[W] an argument is missing, the undertaker is confused"
|
||||
echo "usage: undertaker [options] url://host:path/to/tomb.key"
|
||||
print "[W] an argument is missing, the undertaker is confused" >&2
|
||||
print "usage: undertaker [options] url://host:path/to/tomb.key" >&2
|
||||
exit 1;
|
||||
fi
|
||||
local -a tomb_opts
|
||||
|
Loading…
Reference in New Issue
Block a user