From 1603542c5ac43906f3afa16d5d6107f0fea4c381 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 21 Apr 2015 22:26:41 +0000 Subject: [PATCH] for getattrFunc use getattrInternal instead of getattr getattr throws an exception if the attribute is not present. getattrFunc already throws the same exception (if there isn't a default value passed in). --- src/runtime/builtin_modules/builtins.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/builtin_modules/builtins.cpp b/src/runtime/builtin_modules/builtins.cpp index 1834ca1f8..4f84eafa8 100644 --- a/src/runtime/builtin_modules/builtins.cpp +++ b/src/runtime/builtin_modules/builtins.cpp @@ -427,7 +427,7 @@ Box* getattrFunc(Box* obj, Box* _str, Box* default_value) { Box* rtn = NULL; try { - rtn = getattr(obj, str->data()); + rtn = getattrInternal(obj, str->data(), NULL); } catch (ExcInfo e) { if (!e.matches(AttributeError)) throw e;