[sonic-py-common] Added an API to get file path containing SONiC version (#6309)

* [sonic-py-common] add an API to get file path containing SONiC version so that the API can be mocked for unit tests.
This commit is contained in:
Mahesh Maddikayala 2021-01-03 08:10:28 -08:00 committed by GitHub
parent 36fbc01a59
commit c6253f6334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,6 +297,11 @@ def get_sonic_version_info():
return data
def get_sonic_version_file():
if not os.path.isfile(SONIC_VERSION_YAML_PATH):
return None
return SONIC_VERSION_YAML_PATH
#
# Multi-NPU functionality