Skip to content

Commit 7d0c3af

Browse files
trelalanking
authored andcommitted
[#53] only send ticket when it is not empty
1 parent 0c18e67 commit 7d0c3af

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

irods_http/data_objects.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ def stat(session: IRODSHTTPSession, lpath: str, ticket: str = "") -> dict:
209209
common.validate_instance(lpath, str)
210210
common.validate_instance(ticket, str)
211211

212-
params = {"op": "stat", "lpath": lpath, "ticket": ticket}
212+
params = {"op": "stat", "lpath": lpath}
213+
214+
if ticket != "":
215+
params["ticket"] = ticket
213216

214217
r = requests.get(session.url_base + "/data-objects", params=params, headers=session.get_headers) # noqa: S113
215218
return common.process_response(r)

0 commit comments

Comments
 (0)