aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2013-06-02 23:09:32 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2013-06-02 23:09:32 -0400
commit2c2e5ee8d91796c361e0cdd178e6adc20bd8684f (patch)
tree44ba50cf8bef7155b27199412f155b32fb1284f0
parent57080fb05f93237e17055fa92722dad4011c1525 (diff)
downloadipsutils-2c2e5ee8d91796c361e0cdd178e6adc20bd8684f.tar.gz
Rename TaskController to Controller
-rw-r--r--ipsutils/task.py5
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):