From 27fd295839b7c8ba5a421c6091cdaeb651ae8223 Mon Sep 17 00:00:00 2001 From: devicerandom Date: Wed, 2 Jul 2008 17:39:50 +0000 Subject: [PATCH] (generalvclamp.py) catching all exceptions in plotmanip_flatten so to avoid unnecessary crashes --- generalvclamp.py | 3 ++- hooke_cli.py | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/generalvclamp.py b/generalvclamp.py index 4824465..4f0f0a0 100644 --- a/generalvclamp.py +++ b/generalvclamp.py @@ -168,8 +168,9 @@ class generalvclampCommands: valn[exponent]=sp.polyfit(x_ext,y_ext,exponent) yrn[exponent]=sp.polyval(valn[exponent],x_ret) errn[exponent]=sp.sqrt(sum((yrn[exponent]-y_ext)**2)/float(len(y_ext))) - except TypeError: + except Exception,e: print 'Cannot flatten!' + print e return plot best_exponent=errn.index(min(errn)) diff --git a/hooke_cli.py b/hooke_cli.py index d5aa310..3516823 100755 --- a/hooke_cli.py +++ b/hooke_cli.py @@ -791,8 +791,7 @@ Syntax copylog [directory] print 'OSError. Cannot copy file. Perhaps you gave me a wrong directory?' #OUTLET management - - +#----------------- def do_outlet_show(self,args): '''OUTLET_SHOW --------- @@ -818,10 +817,6 @@ Syntax copylog [directory] else: self.outlet.delete(args) - - - - #OS INTERACTION COMMANDS #----------------- def help_dir(self): -- 2.26.2