diff options
author | nags <nags@nags-desktop.(none)> | 2009-11-16 22:10:15 -0800 |
---|---|---|
committer | nags <nags@nags-desktop.(none)> | 2009-11-16 22:10:15 -0800 |
commit | 84ea9b5635ae77710ef84387d4cdcd3f1b0f5ca2 (patch) | |
tree | 2730e733f951465e60e7da46e27018b7b96cc438 | |
parent | 8f492b7a05d9d486f8691ace2e6a375feda212eb (diff) |
Removed exit on removecallback function
-rw-r--r-- | python/ldtp.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/python/ldtp.py b/python/ldtp.py index 4063121..e081306 100644 --- a/python/ldtp.py +++ b/python/ldtp.py @@ -2028,20 +2028,18 @@ def removecallback (windowTitle): try: # Check for window title in the list of callback - if _callbackFunctions.has_key (windowTitle): - # Exit last thread registered with same window title - _callbackFunctions [windowTitle][1].exit () + if _callbackFunctions.has_key(windowTitle): # delete the previous instance - del _callbackFunctions [windowTitle] - _requestId = threading.currentThread ().getName () + str (command.REMOVECALLBACK) - _message = generatexml (command.REMOVECALLBACK, _requestId, windowTitle) - sendpacket (_message) - _responseStatus, _responseData = getresponse (_requestId) - if _responseStatus [0] != 0: - raise LdtpExecutionError (_responseStatus [1]) + del _callbackFunctions[windowTitle] + _requestId = threading.currentThread().getName() + str(command.REMOVECALLBACK) + _message = generatexml(command.REMOVECALLBACK, _requestId, windowTitle) + sendpacket(_message) + _responseStatus, _responseData = getresponse(_requestId) + if _responseStatus[0] != 0: + raise LdtpExecutionError(_responseStatus[1]) return 1 except LdtpExecutionError, msg: - logFailures ('removecallback failed: %s' % msg.value) + logFailures('removecallback failed: %s' % msg.value) raise def reinitldtp (): |