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:
Ben Hutchings 2013-06-02 20:51:26 +00:00
parent 0b6dc8c4e7
commit 66aee7e881
1 changed files with 3 additions and 0 deletions

View File

@ -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: