From a47c35f84688ea90f8ee50bc8f40b811c6b887c2 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Tue, 27 Nov 2012 14:18:00 +0000 Subject: Fix and simplify skipping modules --- (limited to 'devbot/state.py') diff --git a/devbot/state.py b/devbot/state.py index 1eaf3ac..9bca7d2 100644 --- a/devbot/state.py +++ b/devbot/state.py @@ -30,8 +30,11 @@ def touch_built_commit_id(module): _state_changed() def remove_built_commit_id(module): - del _get_state()["built_modules"][module.name] - _state_changed() + state = _get_state() + + if module.name in state["built_modules"]: + del state["built_modules"][module.name] + _state_changed() def get_built_commit_id(module): return _get_state()["built_modules"].get(module.name, None) -- cgit v0.9.1