From 1df3467888ee5af9d24f5d33081bd695327e1ca9 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Thu, 12 Mar 2015 10:53:01 +0100 Subject: [PATCH] [IMP] fields: remove unnecessary code In `__getattr__`, remove the test on accessing `_attrs`. This situation should never happen, since the attribute `_attrs` is set in method `__init__()`. --- openerp/fields.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/openerp/fields.py b/openerp/fields.py index b70d95709b0..6dd8d6a77d2 100644 --- a/openerp/fields.py +++ b/openerp/fields.py @@ -350,8 +350,6 @@ class Field(object): def __getattr__(self, name): """ Access non-slot field attribute. """ - if name == '_attrs': - raise AttributeError(name) try: return self._attrs[name] except KeyError: