improve error handling on getoutput
- Dominant language
- Python
- Stars
- 18
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
a spurios "failed to retrieve file" is generated when gfal_copy contains a line with the `error` string
https://github.com/dmwm/CRABClient/blob/d4b4151f668ba23cb069569e9613c83776630f6b/src/python/CRABClient/Commands/remote_copy.py#L356
even if the message was harmless and transfer worked OK. E.g.
```
TLS: Unable to create TLS context; invalid private key.
TLS: 47882433451776:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:crypto/x509/x509_cmp.c:303:
```
see https://github.com/dmwm/CRABServer/issues/8357
It is better to rely on gfal-copy exit code first. And only parse stderr in case of failure so somehow translate known messages into more clear error categories.
relevant code is in
https://github.com/dmwm/CRABClient/blob/d4b4151f668ba23cb069569e9613c83776630f6b/src/python/CRABClient/Commands/remote_copy.py#L295-L301
https://github.com/dmwm/CRABClient/blob/d4b4151f668ba23cb069569e9613c83776630f6b/src/python/CRABClient/Commands/remote_copy.py#L333
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.