From 33987705ce06b4c2fa0112de9e988f305d552c1f Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Thu, 27 Nov 2008 03:13:49 +0000 Subject: [PATCH] jqueue: fix a bug in an error path Dictionaries raise KeyError, and not ValueError when invalid keys are passes to del. Reviewed-by: imsnah --- lib/jqueue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jqueue.py b/lib/jqueue.py index c6442f571..66009fb5b 100644 --- a/lib/jqueue.py +++ b/lib/jqueue.py @@ -499,7 +499,7 @@ class JobQueue(object): # Remove master node try: del self._nodes[self._my_hostname] - except ValueError: + except KeyError: pass # TODO: Check consistency across nodes -- GitLab