Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/state.py
diff options
context:
space:
mode:
Diffstat (limited to 'devbot/state.py')
-rw-r--r--devbot/state.py7
1 files changed, 5 insertions, 2 deletions
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)