From e4d52818fc2d38d520666aa3b1f84b2478312ed7 Mon Sep 17 00:00:00 2001 From: mohammed akmal miah Date: Mon, 17 Jan 2022 12:33:05 +0000 Subject: [PATCH] remove csrf check in urlopen --- google/refine/refine.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/google/refine/refine.py b/google/refine/refine.py index 7e21ea5..e78da06 100644 --- a/google/refine/refine.py +++ b/google/refine/refine.py @@ -97,12 +97,8 @@ class RefineServer(object): try: response = urllib2.urlopen(req) except urllib2.HTTPError as e: - if 'Missing or invalid csrf_token parameter' == e.msg: - self.get_csrf_token() - params['csrf_token'] = self.token - response = urllib2.urlopen(req) - else: - raise Exception('HTTP %d "%s" for %s\n\t%s' % (e.code, e.msg, e.geturl(), data)) + raise Exception('HTTP %d "%s" for %s\n\t%s' % + (e.code, e.msg, e.geturl(), data)) except urllib2.URLError as e: raise urllib2.URLError( '%s for %s. No Refine server reachable/running; ENV set?' %