From: devicerandom Date: Wed, 2 Jul 2008 17:39:50 +0000 (+0000) Subject: (generalvclamp.py) catching all exceptions in plotmanip_flatten so to avoid unnecessa... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=89b169c190853947847e483bba36e2264ec3a545;p=hooke.git (generalvclamp.py) catching all exceptions in plotmanip_flatten so to avoid unnecessary crashes --- 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):