Skip to content

Commit

Permalink
remove stray print. returning result as shoji.entity
Browse files Browse the repository at this point in the history
  • Loading branch information
Alig1493 committed Apr 25, 2024
1 parent 8d9e924 commit a137d4c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion src/pycrunch/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ class ElementResponseHandler(lemonpy.ResponseHandler):
parsers = {"application/json": parse_json_element_from_response}

def status_401(self, r):
print(r.json())
login_url = r.json()["urls"]["login_url"]
if r.request.url == login_url:
# This means that the requests was made on the login_url, so it was
Expand Down
7 changes: 1 addition & 6 deletions src/pycrunch/importing.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,7 @@ def add_schema_metadata(self, site, schema, metadata, filename, fp, mimetype="ap
"dataset_id": "None"
}
)
return shoji.Entity(site.session, body={
"status_code": response.status_code,
"payload": response.payload,
"source_url": response.headers.get("Location")
}
)
return shoji.Entity(self=response.headers.get("Location"), session=site.session).refresh()

def add_source(self, ds, filename, fp, mimetype):
"""Create a new Source on the given dataset and return its URL."""
Expand Down

0 comments on commit a137d4c

Please sign in to comment.