[Bug] [jobs.py] Enhance the code to catch a UnicodeDecodeError and provide reasonable message #1260
Closed
1 task done
Labels
Bug
Something isn't working as designed.
Post plan issue
Added to a quarter after planning wsa completed, thus unaplanned.
Milestone
Is there an existing issue for this?
Bug description
The module utils
jobs.py
currently relies on ZOAU for its job processing, if a non-printable char is encountered it will break the Ansible module. This issue will add a try/expect clause around the code that could cause a module failure responding with a reasonable message to the user.The related issues for this error are:
The logical place for this change is here:
try:
tmpcont = read_output(
entry.id, single_dd["stepname"], single_dd["dataset"])
except UnicodeDecodeError as exc:
# DO something here, look at exc, see whats in it, not sure
# what we can do here at this point, read_output will likely
# only have a partial buffer read up to where the first non-printable
# was encountered.
IBM z/OS Ansible core Version
v1.8.0 (default)
IBM Z Open Automation Utilities
v1.2.5 (default)
IBM Enterprise Python
v3.11.x (default)
ansible-version
v2.16.x (default)
z/OS version
v2.5 (default)
Ansible module
No response
Playbook verbosity output.
No response
Ansible configuration.
No response
Contents of the inventory
No response
Contents of
group_vars
orhost_vars
No response
The text was updated successfully, but these errors were encountered: