From b959f09beeebe6333a376484ae04ca202c191776 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Fri, 22 Nov 2024 15:50:37 +0100 Subject: [PATCH] xroot: adapt to python 3.9 --- src/core/xrootiface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/xrootiface.py b/src/core/xrootiface.py index 7a8a1a16..8668a53f 100644 --- a/src/core/xrootiface.py +++ b/src/core/xrootiface.py @@ -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')