diff options
Diffstat (limited to 'addons/readfile.py')
-rw-r--r-- | addons/readfile.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/readfile.py b/addons/readfile.py index 81385ba..494483c 100644 --- a/addons/readfile.py +++ b/addons/readfile.py @@ -18,7 +18,6 @@ import os from ..actions import Action from ..properties import TFileProperty -from ..services import ObjectStore class ReadFile(Action): """ @@ -32,8 +31,10 @@ class ReadFile(Action): """ Perform the action, call read_file on the activity """ + if not "activity" in kwargs: + raise TypeError("Missing activity") if os.path.isfile(str(self.filename)): - ObjectStore().activity.read_file(self.filename) + kwargs["activity"].read_file(self.filename) def undo(self): """ |