This fix adds handling of error/exception message using to_native API instead of decoding. Also, fixes PEP8 errors. Fixes: #31825 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>