From 74b4de79d9016db522d441d7059714e923096fa5 Mon Sep 17 00:00:00 2001
From: tobias <tobias@5a81b35b-ba03-0410-adc8-b2c5c5119f08>
Date: Wed, 11 Aug 2010 16:52:01 +0000
Subject: [PATCH] added LogError to calculate surfaces button

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2646 5a81b35b-ba03-0410-adc8-b2c5c5119f08
---
 modules/gui/pymod/init_context_menu.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/gui/pymod/init_context_menu.py b/modules/gui/pymod/init_context_menu.py
index 068060f1e..85e991a02 100644
--- a/modules/gui/pymod/init_context_menu.py
+++ b/modules/gui/pymod/init_context_menu.py
@@ -4,8 +4,11 @@ from PyQt4 import QtCore, QtGui
 
 import sip
 
+from subprocess import CalledProcessError
+
 from ost import geom, gfx, gui, seq
 from ost import settings
+from ost import LogError
 from ost.bindings import tmtools
 from ost.bindings import msms
 from ost.seq import alg
@@ -214,7 +217,8 @@ class SurfaceContextMenu(QtCore.QObject):
                                   selection=selection,
                                   no_hydrogens=noh)[0]
           gfx.Scene().Add(gfx.Surface("%s_%s"%(entity.GetName(),name),s))
-        except RuntimeError:
+        except (RuntimeError, CalledProcessError):
+          LogError("WARNING: Surface could not be calculated")
           return
   
 
-- 
GitLab