[Zope-Checkins] CVS:
Releases/Zope/lib/python/Products/PythonScripts - PythonScript.py:1.55
Jeremy Hylton
jeremy at zope.com
Tue Mar 9 10:35:52 EST 2004
On Mon, 2004-03-08 at 12:08, Evan Simpson wrote:
> Modified Files:
> PythonScript.py
> Log Message:
> Script (Python) objects now have a _filepath attribute, also used as the '__file__' global at runtime. This prevents an import problem caused by the fix to #1074.
> @@ -320,6 +325,14 @@
> # Store the result in the cache.
> self.ZCacheable_set(result, keywords=keyset)
> return result
> +
> + def manage_afterAdd(self, item, container):
> + if item is self:
> + self._filepath = self.get_filepath()
> +
> + get_filepath=None # Public
> + def get_filepath(self):
> + return self.meta_type + ':' + '/'.join(self.getPhysicalPath())
>
> def manage_haveProxy(self,r): return r in self._proxy_roles
Evan,
This change causes several tests to fail. Some of the AccessControl
tests setup a FauxRoot object that doesn't have a physical path --
calling getPhysicalPath() blows up because it has no getId(). I don't
know if the FauxRoot object should define getId() or if there's some
other solution, but could you fix it?
Jeremy
More information about the Zope-Checkins
mailing list