[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:
parent
36fbc01a59
commit
c6253f6334
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user