-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GoCD server's version can not be parsed #12
Comments
Change was introduced in https://github.com/gocd/gocd/tree/8a306c2f65d72fcaea50ad31cfd05470e0df7844 |
Hello! |
No, the issue are still the tests, did not have time to revisit them. PRs are welcome. |
I am getting the following error. Is it a symptom of this issue? >>> client.pipelines[$PIPELINE]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "$PYTHON_HOME/.virtualenv/$ENV/lib/python3.6/site-packages/yagocd/resources/pipeline.py", line 74, in __getitem__
return self.find(name=name)
File "$PYTHON_HOME/.virtualenv/$ENV/lib/python3.6/site-packages/yagocd/util.py", line 89, in decorated
if LooseVersion(server_version) < self._since_version:
File "/usr/lib/python3.6/distutils/version.py", line 52, in __lt__
c = self._cmp(other)
File "/usr/lib/python3.6/distutils/version.py", line 335, in _cmp
if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version' My current workaround is to simply comment out lines 89 through 98 in def __call__(self, entity):
@functools.wraps(entity)
def decorated(*args, **kwargs):
if self.ENABLED:
this = args[0]
server_version = this._session.server_version
'''
if LooseVersion(server_version) < self._since_version:
name = "{}.{}".format(this.__class__.__name__, entity.__name__)
raise RuntimeError(
"Method `{name}` is not supported on '{server_version}' "
"version of GoCD, it has been added only in '{since_version}' version!".format(
name=name,
server_version=server_version,
since_version=self._since_version
)
)
'''
return entity(*args, **kwargs) Everything else seems to work okay when I do this, but this obviously shouldn't be a long term solution. I wanted to make sure I'm not opening a new issue if this issue is what my problem is. EDIT: class Since(object):
# Parameter for controlling version compatibility checks.
# Setting this to `False` will skip checking the server
# version on each function call.
ENABLED = False |
GoCD's about page changed layout and is thus no longer parsable by the
InfoManager
class.Which leads to an error when trying to connect to a GOCD-Server v19.5.0
The text was updated successfully, but these errors were encountered: