Add __str__ method to debian_linux.debian.Version
Python 2.x does not use the __unicode__ method to implement str() or string formatting with %s. Add a __str__ method as a wrapper. svn path=/dists/trunk/linux/; revision=20180
This commit is contained in:
parent
0b6dc8c4e7
commit
66aee7e881
|
@ -85,6 +85,9 @@ $
|
|||
def __unicode__(self):
|
||||
return self.complete
|
||||
|
||||
def __str__(self):
|
||||
return unicode(self).encode('utf-8')
|
||||
|
||||
@property
|
||||
def complete(self):
|
||||
if self.epoch is not None:
|
||||
|
|
Loading…
Reference in New Issue