summaryrefslogtreecommitdiff
path: root/morphlib/morphologyfactory.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-08-07 12:09:38 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-08-07 12:09:38 +0100
commit6d136040997269f13b8a94ee34737d9b750d2b0e (patch)
tree35a213f9e21a7527761d4592ca1061d0104f18c1 /morphlib/morphologyfactory.py
parent4e770df468874829ee1dfbc0532d0777f64f0706 (diff)
downloadmorph-6d136040997269f13b8a94ee34737d9b750d2b0e.tar.gz
Fix deprecation message when showing error message
It turns out that BaseException.message is deprecated, and str(e) is a better way of achieving that. This makes the unit tests not spew out a deprecation warning.
Diffstat (limited to 'morphlib/morphologyfactory.py')
-rw-r--r--morphlib/morphologyfactory.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/morphlib/morphologyfactory.py b/morphlib/morphologyfactory.py
index c6ba3a4e..89288b33 100644
--- a/morphlib/morphologyfactory.py
+++ b/morphlib/morphologyfactory.py
@@ -53,7 +53,7 @@ class MorphologyFactory(object):
morphology = morphlib.morph2.Morphology(text)
except ValueError as e:
raise morphlib.Error("Error parsing %s: %s" %
- (filename, e.message))
+ (filename, str(e)))
method_name = '_check_and_tweak_%s' % morphology['kind']
if hasattr(self, method_name):