diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-26 22:51:22 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-26 22:51:22 (GMT) |
commit | 7733514f0860ed1529c9effe831aa683cdc7d3c4 (patch) | |
tree | 6f42cc9aca7ec73a08412beb108b424a66d5444b /devbot/state.py | |
parent | f7a5dd469a381c1b2f358f41bcd105cf4651df56 (diff) |
Cleanup clean
Diffstat (limited to 'devbot/state.py')
-rw-r--r-- | devbot/state.py | 21 |
1 files changed, 7 insertions, 14 deletions
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 |