From fcd3be2d973e9ecc9bbc95425cb2e1a261a3f18a Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Fri, 14 Jul 2017 14:00:46 -0400 Subject: Update Python to use BNUpdateAnalysisAndWait --- python/binaryview.py | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'python') diff --git a/python/binaryview.py b/python/binaryview.py index 82c9b727..3242b89c 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -1821,29 +1821,7 @@ class BinaryView(object): :rtype: None """ - class WaitEvent(object): - def __init__(self): - self.cond = threading.Condition() - self.done = False - - def complete(self): - self.cond.acquire() - self.done = True - self.cond.notify() - self.cond.release() - - def wait(self): - self.cond.acquire() - while not self.done: - self.cond.wait() - self.cond.release() - - wait = WaitEvent() - # TODO: figure out if we actually need this 'event' variable, likely we do - event = AnalysisCompletionEvent(self, lambda: wait.complete()) - core.BNUpdateAnalysis(self.handle) - wait.wait() - del event # Get rid of unused variable warning + core.BNUpdateAnalysisAndWait(self.handle) def abort_analysis(self): """ -- cgit v1.3.1