From d5ce5db32ca15cef8eefa548a438a9fcc4502a6d Mon Sep 17 00:00:00 2001 From: xiaowuyz <31556062+xiaowuyz@users.noreply.github.com> Date: Wed, 26 Sep 2018 16:45:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9KeyError=E7=9A=84raise=20(#73?= =?UTF-8?q?9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- itchat/storage/templates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itchat/storage/templates.py b/itchat/storage/templates.py index 7c6dd917..2c23c3e4 100644 --- a/itchat/storage/templates.py +++ b/itchat/storage/templates.py @@ -13,7 +13,7 @@ def __getattr__(self, value): return self[keyName] except KeyError: raise AttributeError("'%s' object has no attribute '%s'" % ( - self.__class__.__name__.split('.')[-1], value)) + self.__class__.__name__.split('.')[-1], keyName)) def get(self, v, d=None): try: return self[v]