Closed gmuloc closed 6 years ago
Hello,
Python provides an API to get which version of a module you have installed...
>>> import pkg_resources
>>> pkg_resources.get_distribution('ciscoconfparse').version
'1.3.20'
>>>
This should work, regardless of what version of ciscoconfparse you have installed.
If you want to require a certain version number, consider using the information from this stackoverflow answer
To ensure that you have higher than ciscoconfparse version 1.2.39...
>>> import pkg_resources
>>> pkg_resources.require("ciscoconfparse>=1.2.39")
This will raise a VersionConflict
error if the condition isn't met
Not something too bothering, I think but thought I would flag it here as it caused one of my scripts to fail.
I have a script checking that ciscoconfparse version installed on the system is above some value (1.2.39)
While I can easily fix it in my code thought I would mention this here. It was introduced in https://github.com/mpenning/ciscoconfparse/commit/7caadc34daec6398182ea74d39cbf0813c53744e when the version file stopped being imported.