From ef62b2c146bb1c8960a3ee700c544d61519998b2 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Fri, 24 Jul 2020 02:15:59 +0300 Subject: Remove unreachable conditional * wqflask/base/GeneralObject.py(__getattr__): remove if statement that is unreachable --- wqflask/base/GeneralObject.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wqflask/base/GeneralObject.py b/wqflask/base/GeneralObject.py index 37bfeda3..0fccaab3 100644 --- a/wqflask/base/GeneralObject.py +++ b/wqflask/base/GeneralObject.py @@ -43,10 +43,7 @@ class GeneralObject: return getattr(self, key) def __getattr__(self, key): - if key in self.__dict__.keys(): - return self.__dict__[key] - else: - return eval("self.__dict__.%s" % key) + return eval("self.__dict__.%s" % key) def __len__(self): return len(self.__dict__) - 1 -- cgit v1.2.3