From 034e36d4983da0c2d44c56d4efd9af922b2cab4e Mon Sep 17 00:00:00 2001 From: Vincent Vinet Date: Mon, 07 Dec 2009 20:50:52 +0000 Subject: pass the overlayer as a keyword argument for do, enter_editmode and subscribe, remove object store references --- (limited to 'addons/readfile.py') 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): """ -- cgit v0.9.1