From cc073fbfcc4cca26ded8498d6a89e2dd4aa35784 Mon Sep 17 00:00:00 2001
From: James Graham <J.A.Graham@soton.ac.uk>
Date: Fri, 2 Jun 2017 14:14:40 +0100
Subject: [PATCH] Fix failing test with Py3.2 - Exceptions do not have msg

---
 pycgtool/frame.py       | 2 +-
 pycgtool/framereader.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pycgtool/frame.py b/pycgtool/frame.py
index 5edd16e..c50fb96 100644
--- a/pycgtool/frame.py
+++ b/pycgtool/frame.py
@@ -200,7 +200,7 @@ class Frame:
             try:
                 import mdtraj
             except ImportError as e:
-                if "scipy" in e.msg:
+                if "scipy" in repr(e):
                     e.msg = "XTC output with MDTraj also requires Scipy"
                 else:
                     e.msg = "XTC output requires the module MDTraj (and probably Scipy)"
diff --git a/pycgtool/framereader.py b/pycgtool/framereader.py
index 9a4fcb3..c843f77 100644
--- a/pycgtool/framereader.py
+++ b/pycgtool/framereader.py
@@ -181,7 +181,7 @@ class FrameReaderMDTraj(FrameReader):
         try:
             import mdtraj
         except ImportError as e:
-            if "scipy" in e.msg:
+            if "scipy" in repr(e):
                 e.msg = "The MDTraj FrameReader also requires Scipy"
             else:
                 e.msg = "The MDTraj FrameReader requires the module MDTraj (and probably Scipy)"
-- 
GitLab