fix weird failure in variant values (#22328)
This commit is contained in:
		| @@ -282,8 +282,21 @@ def _value_setter(self, value): | |||||||
|         # to a set |         # to a set | ||||||
|         self._value = tuple(sorted(set(value))) |         self._value = tuple(sorted(set(value))) | ||||||
| 
 | 
 | ||||||
|  |     def _cmp_value(self): | ||||||
|  |         """Returns a tuple of strings containing the values stored in | ||||||
|  |         the variant. | ||||||
|  | 
 | ||||||
|  |         Returns: | ||||||
|  |             tuple of str: values stored in the variant | ||||||
|  |         """ | ||||||
|  |         value = self._value | ||||||
|  |         if not isinstance(value, tuple): | ||||||
|  |             value = (value,) | ||||||
|  |         stringified = tuple(str(x) for x in value) | ||||||
|  |         return stringified | ||||||
|  | 
 | ||||||
|     def _cmp_key(self): |     def _cmp_key(self): | ||||||
|         return self.name, self.value |         return self.name, self._cmp_value() | ||||||
| 
 | 
 | ||||||
|     def copy(self): |     def copy(self): | ||||||
|         """Returns an instance of a variant equivalent to self |         """Returns an instance of a variant equivalent to self | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Danny McClanahan
					Danny McClanahan