As of Python 3.5 platform.linux_distribution() is deprecated and it's planned to be removed from Python 3.7.
Is there anything I could uses instead of platform.linux_distribution()?
platform.uname() doesn't yield the information I need. I'm running the code in a Docker container and platform.uname() returns the details for the host machine, not the image.
In particular, I'm building a portable Linux distribution and I want to test it on the canonical CentOS 5.11 distribution. I'm looking for a simple way to identify the OS to identify/tag the build results.

所有评论(0)