From 87a892a2326fab442639241ca180bff66e022112 Mon Sep 17 00:00:00 2001 From: Darragh Bailey Date: Tue, 29 Sep 2015 18:03:27 +0100 Subject: [PATCH] Use str as base class for PluginVersion To allow PluginVersion class to be passed to builtin functions expecting a string type, need to use 'str' as the base class. This ensures the change to support version comparison is completely transparent to the calling code, but permits changes to benefit from the new behaviour without breaking existing usage. Change-Id: I7d434294fa45171e47ea4876d01398cb75f5d962 --- jenkins/plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/plugins.py b/jenkins/plugins.py index d16e1d5..9709d5d 100644 --- a/jenkins/plugins.py +++ b/jenkins/plugins.py @@ -67,7 +67,7 @@ class Plugin(dict): super(Plugin, self).__setitem__(key, value) -class PluginVersion(object): +class PluginVersion(str): '''Class providing comparison capabilities for plugin versions.''' _VERSION_RE = re.compile(r'(.*)-(?:SNAPSHOT|BETA)')