From bd8d9e2727c76dce0f2b99e2eeb4e661705287d3 Mon Sep 17 00:00:00 2001 From: Benoit Thiell Date: Wed, 18 May 2011 15:03:06 -0400 Subject: [PATCH] Fix bad function calls RefineProject.apply_operations and RefineProject.wait_until_idle called RefineProject.do when they are supposed to call RefineProject.do_json. --- google/refine/refine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google/refine/refine.py b/google/refine/refine.py index 13a70af..7d87e86 100644 --- a/google/refine/refine.py +++ b/google/refine/refine.py @@ -285,7 +285,7 @@ class RefineProject: def wait_until_idle(self, polling_delay=0.5): while True: - response = self.do('get-processes') + response = self.do_json('get-processes') if 'processes' in response and len(response['processes']) > 0: time.sleep(polling_delay) else: @@ -293,7 +293,7 @@ class RefineProject: def apply_operations(self, file_path, wait=True): 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: self.wait_until_idle() return 'ok'