Skip to content

Commit

Permalink
Merge pull request #13501 from shinobu-x/wip-18371-kraken
Browse files Browse the repository at this point in the history
 kraken: ceph-disk: error on _bytes2str
  • Loading branch information
liewegas committed Mar 4, 2017
2 parents 7e16ea2 + e2074ce commit 98a87fa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ceph-disk/ceph_disk/main.py
Expand Up @@ -303,7 +303,12 @@ class Error(Exception):

def __str__(self):
doc = _bytes2str(self.__doc__.strip())
return ': '.join([doc] + [_bytes2str(a) for a in self.args])
try:
str_type = basestring
except NameError:
str_type = str
args = [a if isinstance(a, str_type) else str(a) for a in self.args]
return ': '.join([doc] + [_bytes2str(a) for a in args])


class MountError(Error):
Expand Down

0 comments on commit 98a87fa

Please sign in to comment.