Skip to content

Commit 7dc3cd9

Browse files
authored
content negotiation
1 parent 122d0b6 commit 7dc3cd9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/bald/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,9 @@ def __getitem__(self, item):
238238
# import datetime
239239
# now = datetime.datetime.utcnow()
240240
# print('\ndownloading: {}'.format(item))
241-
self.cache[item] = requests.get(item)
241+
self.cache[item] = requests.get(item)
242242
try:
243+
# Attempt content negotiation, but pass if problems occur.
243244
headers = {'Accept': 'application/rdf+xml'}
244245
self.cache[item] = requests.get(item, headers=headers)
245246
except Exception:

0 commit comments

Comments
 (0)