python-distro / distro

A much more elaborate replacement for removed Python's `platform.linux_distribution()` method
https://distro.readthedocs.io/
Apache License 2.0
265 stars 66 forks source link

Ignore the file '/etc/ec2_version' #359

Closed pritamvkulkarni closed 1 year ago

pritamvkulkarni commented 1 year ago

Dear Sebastian, dear maintainers,

Closes https://github.com/python-distro/distro/issues/358

It was observed that on ubuntu22.04.2 instances created on GCP and Azure with python installed, distro.version() returned incorrect version due to incorrect version present in /etc/ec2_version file.

This pull request contains a small change to add /etc/ec2_version as part of _DISTRO_RELEASE_IGNORE_BASENAMES, so that it wont be used as data source.

Thank you.

pritamvkulkarni commented 1 year ago

Missing write access, request to merge.