Fix bad function calls

RefineProject.apply_operations and RefineProject.wait_until_idle called RefineProject.do when they are supposed to call RefineProject.do_json.
This commit is contained in:
Benoit Thiell 2011-05-18 15:03:06 -04:00
parent f3354f6fc1
commit bd8d9e2727
1 changed files with 2 additions and 2 deletions

View File

@ -285,7 +285,7 @@ class RefineProject:
def wait_until_idle(self, polling_delay=0.5): def wait_until_idle(self, polling_delay=0.5):
while True: while True:
response = self.do('get-processes') response = self.do_json('get-processes')
if 'processes' in response and len(response['processes']) > 0: if 'processes' in response and len(response['processes']) > 0:
time.sleep(polling_delay) time.sleep(polling_delay)
else: else:
@ -293,7 +293,7 @@ class RefineProject:
def apply_operations(self, file_path, wait=True): def apply_operations(self, file_path, wait=True):
json = open(file_path).read() json = open(file_path).read()
response_json = self.do('apply-operations', {'operations': json}) response_json = self.do_json('apply-operations', {'operations': json})
if response_json['code'] == 'pending' and wait: if response_json['code'] == 'pending' and wait:
self.wait_until_idle() self.wait_until_idle()
return 'ok' return 'ok'