Print

Print


The finalize method in `bindings/python/libs/client/finalize.py` iterates over all references known to the garbage collector, even those not created by the xrootd bindings. This does not work correctly when the target of a weak reference has been already
collected.

This pr catches this exception, e.g.:

Traceback (most recent call last):
  File
  ".../envs/topcoffea-env/lib/python3.8/site-packages/XRootD/client/finalize.py",
  line 46, in finalize
      if isinstance(obj, File) and obj.is_open():
ReferenceError: weakly-referenced object no longer exists
You can view, comment on, or merge this pull request online at:

  https://github.com/xrootd/xrootd/pull/1498

-- Commit Summary --

  * python bindings: catch ReferenceError error when finalizing File's

-- File Changes --

    M bindings/python/libs/client/finalize.py (7)

-- Patch Links --

https://github.com/xrootd/xrootd/pull/1498.patch
https://github.com/xrootd/xrootd/pull/1498.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/1498

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1