Skip to content

Commit

Permalink
xroot: adapt to python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Nov 22, 2024
1 parent 5b0c444 commit b959f09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/xrootiface.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def _xrootcmd(endpoint, cmd, subcmd, userid, args, app='wopi'):
if not f.is_open():
log.error(f'msg="Error or timeout with xroot" cmd="{cmd}" subcmd="{subcmd}" args="{args}" rc="{rc}"')
raise IOError(f'Timeout executing {cmd}')
res = b''.join(f.readlines()).split(b'&')
_, res = f.read()
res = res.split(b'&')
if len(res) == 3: # we may only just get stdout: in that case, assume it's all OK
rc = res[2].strip(b'\n').decode()
rc = rc[rc.find('=') + 1:].strip('\00')
Expand Down

0 comments on commit b959f09

Please sign in to comment.