Skip to content

Commit

Permalink
fixing error in the workflow regarding writeOai.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Azzouz-Thuderoz committed Jan 17, 2024
1 parent 8a0c0eb commit 29dd778
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/zbmath_rest2oai/writeOai.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ def write_oai(x):
#x = requests.post("http://localhost:8081/oai-backend/item", files=files)
basic = HTTPBasicAuth('swmath', os.environ.get('OAI_BASIC_PASSWORD'))
x = requests.post("http://oai-input.portal.mardi4nfdi.de/oai-backend/item", files=files , auth=basic)
if r.status_code != 200:
raise Exception(f"Unexpected response with status code {r.status_code}: {r.text}")
if x.status_code != 200:
raise Exception(f"Unexpected response with status code {x.status_code}: {x.text}")
else:
return
print(x.text)
return x.text

# x = requests.get('http://localhost:8081/oai-backend/item/10.5072%2F38236')

0 comments on commit 29dd778

Please sign in to comment.