From: devicerandom Date: Mon, 2 Mar 2009 13:36:42 +0000 (+0000) Subject: (generalvclamp.py) error checking in slope command X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=986b85cd55fa22058ef0954523f2ee8e6620604b;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:'