Browse Source

Remove unnecessary check for private members in serializer

__getattr__ is only called for attributes that don't exist; callers
should never purposely see the private __* symbols, so we don't need
to check for them.
tags/nilmdb-2.0.0
Jim Paris 2 years ago
parent
commit
d907638858
1 changed files with 0 additions and 2 deletions
  1. +0
    -2
      nilmdb/utils/serializer.py

+ 0
- 2
nilmdb/utils/serializer.py View File

@@ -82,8 +82,6 @@ def serializer_proxy(obj_or_type):
self._thread_safe = True

def __getattr__(self, key):
if key.startswith("_SerializerObjectProxy__"): # pragma: no cover
raise AttributeError
attr = getattr(self.__object, key)
if not callable(attr):
getter = SerializerCallProxy(self.__call_queue, getattr, self)


Loading…
Cancel
Save