Don't escape strings in PortageException as that breaks newline handling (bug 147785)
authorMarius Mauch <genone@gentoo.org>
Thu, 11 Jan 2007 08:22:51 +0000 (08:22 -0000)
committerMarius Mauch <genone@gentoo.org>
Thu, 11 Jan 2007 08:22:51 +0000 (08:22 -0000)
svn path=/main/trunk/; revision=5546

pym/portage_exception.py

index 57eafb505de5d448517781a3de9719be78b7964c..8791b2fd5fa81bbae02410e445da1de0b4cfe707 100644 (file)
@@ -8,7 +8,10 @@ class PortageException(Exception):
        def __init__(self,value):
                self.value = value[:]
        def __str__(self):
-               return repr(self.value)
+               if isinstance(self.value, str):
+                       return self.value
+               else:
+                       return repr(self.value)
 
 class CorruptionError(PortageException):
        """Corruption indication"""