summaryrefslogtreecommitdiffstats
path: root/Lib/weakref.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/weakref.py')
-rw-r--r--Lib/weakref.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/weakref.py b/Lib/weakref.py
index bdb89fb..c5e5247 100644
--- a/Lib/weakref.py
+++ b/Lib/weakref.py
@@ -51,7 +51,7 @@ class WeakValueDictionary(UserDict.UserDict):
def __getitem__(self, key):
o = self.data[key]()
if o is None:
- raise KeyError, key
+ raise KeyError(key)
else:
return o
@@ -142,7 +142,7 @@ class WeakValueDictionary(UserDict.UserDict):
return args[0]
raise
if o is None:
- raise KeyError, key
+ raise KeyError(key)
else:
return o