From da0a0d3dd3a72c7d223534828e2e6b3920af9226 Mon Sep 17 00:00:00 2001 From: Dave Marchant Date: Wed, 18 Dec 2013 16:15:01 -0800 Subject: [PATCH] Modified callHooks to work when wrapping methods with no docstrings. --- SimPEG/utils/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SimPEG/utils/__init__.py b/SimPEG/utils/__init__.py index 8d9b0504..4a68be38 100644 --- a/SimPEG/utils/__init__.py +++ b/SimPEG/utils/__init__.py @@ -119,8 +119,10 @@ def callHooks(match): Where the * can be any string. If present, _%s* will be called at the start of the default %s call. You may also completely overwrite this function. """ % (match, match, match, match) - - wrapper.__doc__ += extra + try: + wrapper.__doc__ += extra + except Exception, e: + pass return wrapper return callHooksWrap