pyTenable
pyTenable copied to clipboard
Bug: AttributeError: 'VersionInfo' object has no attribute 'match' for semver<2.10.0
Semver is listed as >=2.8.1 in the dependencies, but any version before 2.10.0 will cause the bug:
File "tenable_sc_client.py", line 41, in setup
self._tenable_sc = sc.TenableSC(self._host, self._access_key, self._secret_key, retries=1)
File "site-packages/tenable/sc/__init__.py", line 209, in __init__
super().__init__(**kwargs)
File "site-packages/tenable/base/platform.py", line 102, in __init__
super().__init__(**kwargs)
File "site-packages/restfly/session.py", line 236, in __init__
self._authenticate(**kwargs)
File "site-packages/tenable/base/platform.py", line 166, in _authenticate
kwargs['key_auth_func'](**keys)
File "site-packages/tenable/sc/__init__.py", line 232, in _key_auth
or VersionInfo.parse(self.version).match('>=5.13.0')
AttributeError: 'VersionInfo' object has no attribute 'match'
To Reproduce Steps to reproduce the behavior:
- Use Tenable.SC version: 5.20
- Call
from tenable import sc; sc.TenableSC(host, access_key, secret_key, retries=1)
- See error
Expected behavior no error :)
System Information (please complete the following information):
- OS: MacOS
- Architecture 64bit
- Version pyTenable==1.4.3
Additional context Pretty sure this bug was introduced by PR #315 (which solves #314)