diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2013-06-02 23:09:32 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2013-06-02 23:09:32 -0400 |
commit | 2c2e5ee8d91796c361e0cdd178e6adc20bd8684f (patch) | |
tree | 44ba50cf8bef7155b27199412f155b32fb1284f0 /ipsutils | |
parent | 57080fb05f93237e17055fa92722dad4011c1525 (diff) | |
download | ipsutils-2c2e5ee8d91796c361e0cdd178e6adc20bd8684f.tar.gz |
Rename TaskController to Controller
Diffstat (limited to 'ipsutils')
-rw-r--r-- | ipsutils/task.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipsutils/task.py b/ipsutils/task.py index 1dfe188..94aed14 100644 --- a/ipsutils/task.py +++ b/ipsutils/task.py @@ -16,7 +16,7 @@ class TaskException(Exception): pass -class TaskController(object): +class Controller(object): def __init__(self): self.stack = [] @@ -29,6 +29,9 @@ class TaskController(object): def do_tasks(self): """ FILO execution of tasks """ + if not self.stack: + raise TaskException("Empty controller stack") + for stack_entry in self.stack: status = stack_entry.run() if type(status) == type(True): |