Skip to content

Fix infinite recursion in __getattr__

Sebastien Wertz requested to merge swertz/bamboo:fixRecursion into master

As discussed; I didn't find any other use of __getattr__.

The infinite recursion was initially triggered because an op.define was called to declare a C++ object although the class was not defined. This now results in something more human-readable:

RuntimeError: <namespace cppyy.gbl at 0x37e5f00> has no attribute 'BTagEffEvaluator'. Full details:                                                                                         
  type object '' has no attribute 'BTagEffEvaluator'
  'BTagEffEvaluator' is not a known C++ class
  'BTagEffEvaluator' is not a known C++ template
  'BTagEffEvaluator' is not a known C++ enum

Merge request reports