From: devicerandom Date: Mon, 2 Mar 2009 13:36:42 +0000 (+0000) Subject: (generalvclamp.py) error checking in slope command X-Git-Tag: 0.9.0~42 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3811f20cacb193a963cb6889dba35e01510af0b4;p=hooke.git (generalvclamp.py) error checking in slope command --- diff --git a/generalvclamp.py b/generalvclamp.py index b7c9ed0..f4351d0 100644 --- a/generalvclamp.py +++ b/generalvclamp.py @@ -228,7 +228,11 @@ class generalvclampCommands: # Calls the function linefit_between parameters=[0,0,[],[]] - parameters=self.linefit_between(clickedpoints[0],clickedpoints[1]) + try: + parameters=self.linefit_between(clickedpoints[0],clickedpoints[1]) + except: + print 'Cannot fit. Did you click twice the same point?' + return # Outputs the relevant slope parameter print 'Slope:'