diff options
author | Vincent Vinet <vince.vinet@gmail.com> | 2009-12-07 20:50:52 (GMT) |
---|---|---|
committer | Vincent Vinet <vince.vinet@gmail.com> | 2009-12-07 20:52:25 (GMT) |
commit | 034e36d4983da0c2d44c56d4efd9af922b2cab4e (patch) | |
tree | 8fc4726e09ac60cbfd64b0ee068f451144cecf3b /addons/readfile.py | |
parent | 7e65bdb14c2b3a9e04762755a19fcdc9922291fc (diff) |
pass the overlayer as a keyword argument for do, enter_editmode and subscribe, remove object store references
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): """ |