projects
/
hooke.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2311e9e
)
(generalvclamp.py) error checking in slope command
author
devicerandom
<devnull@localhost>
Mon, 2 Mar 2009 13:36:42 +0000
(13:36 +0000)
committer
devicerandom
<devnull@localhost>
Mon, 2 Mar 2009 13:36:42 +0000
(13:36 +0000)
generalvclamp.py
patch
|
blob
|
history
diff --git
a/generalvclamp.py
b/generalvclamp.py
index b7c9ed03cbc2e9c915e53748d7fbf460d84b53e3..f4351d0b504b31c7ce991ca93154d2557c730a14 100644
(file)
--- 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:'