We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37fa812 commit b75ca73Copy full SHA for b75ca73
examples/cdi-exporter/transformer.py
@@ -25,11 +25,10 @@ def get_cdi_file_content(site_url, file_id):
25
url = site_url + '/api/access/datafile/' + str(file_id)
26
request = urllib2.Request(url)
27
response = urllib2.urlopen(request, timeout=30)
28
- content = response.read()
29
- # Try to parse as JSON to validate
30
- parsed = json.loads(content)
31
- return parsed
32
- except:
+ return response.read()
+ except Exception as e:
+ import sys
+ sys.stderr.write('Error downloading CDI file: ' + str(e) + '\n')
33
return None
34
35
# Try to find and return existing CDI file
0 commit comments