Browse Source

Complain when an attribute is not found

Hamilton Turner 10 years ago
parent
commit
bfefdc446b
1 changed files with 7 additions and 1 deletions
  1. 7 1
      toolset/benchmark/framework_test.py

+ 7 - 1
toolset/benchmark/framework_test.py

@@ -1233,7 +1233,13 @@ class FrameworkTest:
   def __getattr__(self, name):
   def __getattr__(self, name):
     """For backwards compatibility, we used to pass benchmarker 
     """For backwards compatibility, we used to pass benchmarker 
     as the argument to the setup.py files"""
     as the argument to the setup.py files"""
-    return getattr(self.benchmarker, name)
+    try:
+      x = getattr(self.benchmarker, name)
+    except AttributeError:
+      print "AttributeError: %s not a member of FrameworkTest or Benchmarker" % name
+      print "This is probably a bug"
+      raise
+    return x
 
 
   ##############################################################
   ##############################################################
   # Begin __calculate_average_stats
   # Begin __calculate_average_stats