Skip to content
Snippets Groups Projects

Delay XRootD import to only require it if an eos file is requested

Merged Daniel Hugo Campora Perez requested to merge dcampora_delay_xrootd_import into master
All threads resolved!
1 file
+ 2
1
Compare changes
  • Side-by-side
  • Inline
@@ -8,13 +8,14 @@
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
import os, XRootD.client
import os
def load_file(fname):
if not fname: return None
if fname.startswith("root://eoslhcb.cern.ch//"):
import XRootD.client
with XRootD.client.File() as f:
status, _ = f.open(str(fname))
if not status.ok:
Loading