diff options
Diffstat (limited to 'version.py')
| -rw-r--r-- | version.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -166,6 +166,8 @@ class StrictVersion (Version): def _cmp (self, other): if isinstance(other, str): other = StrictVersion(other) + elif not isinstance(other, StrictVersion): + return NotImplemented if self.version != other.version: # numeric versions don't match @@ -331,6 +333,8 @@ class LooseVersion (Version): def _cmp (self, other): if isinstance(other, str): other = LooseVersion(other) + elif not isinstance(other, LooseVersion): + return NotImplemented if self.version == other.version: return 0 |
