I'm currently running the openstack
executable and it generates python deprecation warnings.
After some searching I did find this howto.
The relevant part is here:
Use the
PYTHONWARNINGS
Environment Variable to Suppress Warnings in PythonWe can export a new environment variable in Python 2.7 and up. We can export
PYTHONWARNINGS
and set it to ignore to suppress the warnings raised in the Python program.
However, doing this:
PYTHONWARNINGS="ignore" openstack image show image name -f value -c id
does nothing, deprecation warnings are still displayed.
I've tried setting PYTHONWARNINGS
to various things:
ignore
"ignore"
"all"
"deprecated"
"ignore::DeprecationWarning"
"error::Warning,default::Warning:has_deprecated_syntax"
"error::Warning"
but none of them seem to do anything.
I was able to work around the issue by appending 2>/dev/null
to the end but I would like to know why PYTHONWARNINGS
doesn't seem to do anything.