From 7733514f0860ed1529c9effe831aa683cdc7d3c4 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Wed, 26 Dec 2012 22:51:22 +0000 Subject: Cleanup clean --- (limited to 'devbot/state.py') diff --git a/devbot/state.py b/devbot/state.py index 41d458b..4b9af18 100644 --- a/devbot/state.py +++ b/devbot/state.py @@ -101,22 +101,15 @@ def full_build_touch(): _save_state(_FULL_BUILD, full_build) -def clean_build_state(): - try: - for name in _BUILT_MODULES, _FULL_BUILD: - os.unlink(_get_state_path(name)) - except OSError: - pass +def clean(build_only=False): + print "* Deleting state" - -def clean(): - _state = None - - print "Deleting state" - - clean_build_state() + names = [_BUILT_MODULES, _FULL_BUILD] + if not build_only: + names.append(_SYSTEM_CHECK) try: - os.unlink(_get_state_path(_SYSTEM_CHECK)) + for name in names: + os.unlink(_get_state_path(name)) except OSError: pass -- cgit v0.9.1