a couple minor fixes w/ burnettk
This commit is contained in:
parent
98b30d4a34
commit
a47a00bd7f
|
@ -28,7 +28,11 @@ REALM_NAME=${2-spiffworkflow}
|
||||||
while read -r input_line; do
|
while read -r input_line; do
|
||||||
if ! grep -qE '(^#|email)' <<<"$input_line" ; then
|
if ! grep -qE '(^#|email)' <<<"$input_line" ; then
|
||||||
username=$(awk -F '@' '{print $1}' <<<"$input_line")
|
username=$(awk -F '@' '{print $1}' <<<"$input_line")
|
||||||
access_token=$("${script_dir}/get_token" "$username" "$username" "$REALM_NAME" || echo '')
|
password=$(awk -F ',' '{print $2}' <<<"$input_line")
|
||||||
|
if [[ -z "$password" ]]; then
|
||||||
|
password="$username"
|
||||||
|
fi
|
||||||
|
access_token=$("${script_dir}/get_token" "$username" "$password" "$REALM_NAME" || echo '')
|
||||||
if [[ -z "$access_token" || "$access_token" == "null" ]]; then
|
if [[ -z "$access_token" || "$access_token" == "null" ]]; then
|
||||||
>&2 echo "ERROR: failed to get access token for '$username'"
|
>&2 echo "ERROR: failed to get access token for '$username'"
|
||||||
else
|
else
|
||||||
|
|
|
@ -128,7 +128,7 @@ class ApiError(Exception):
|
||||||
instance = cls(code, message, status_code=status_code)
|
instance = cls(code, message, status_code=status_code)
|
||||||
instance.task_id = task_spec.name or ""
|
instance.task_id = task_spec.name or ""
|
||||||
instance.task_name = task_spec.description or ""
|
instance.task_name = task_spec.description or ""
|
||||||
if task_spec._wf_spec:
|
if hasattr(task_spec, '_wf_spec') and task_spec._wf_spec:
|
||||||
instance.file_name = task_spec._wf_spec.file
|
instance.file_name = task_spec._wf_spec.file
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue