From 9d2b9d8a56fbd6ae619203dd6ea8f9edeca5e463 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 4 Oct 2009 19:01:12 +0200 Subject: [PATCH] [entropy.exceptions] make module Python 3.x aware --- libraries/entropy/exceptions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/entropy/exceptions.py b/libraries/entropy/exceptions.py index 75e29384c..6bf849097 100644 --- a/libraries/entropy/exceptions.py +++ b/libraries/entropy/exceptions.py @@ -11,6 +11,7 @@ This module contains Entropy Framework exceptions classes. """ +from entropy.const import const_isstring class EntropyException(Exception): """General superclass for Entropy exceptions""" @@ -19,10 +20,9 @@ class EntropyException(Exception): Exception.__init__(self) def __str__(self): - if isinstance(self.value, basestring): + if const_isstring(self.value): return self.value - else: - return repr(self.value) + return repr(self.value) class CorruptionError(EntropyException): """Corruption indication"""