zope2/ScriptDebugging

changeset 6:3a767e84b524

Fixed a bug when creating PythonScripts programatically.
author lregebro
date Wed, 22 Sep 2004 17:16:39 +0000
parents 0d01358ab35a
children b8eda1e027e3
files __init__.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/__init__.py
     1.2 +++ b/__init__.py
     1.3 @@ -30,7 +30,8 @@
     1.4  # Add support for storing a path to the file.
     1.5  def __init__(self, id, filepath=None):
     1.6      self.id = id
     1.7 -    self._filepath = filepath
     1.8 +    if filepath:
     1.9 +        self._filepath = filepath
    1.10      self.ZBindings_edit(defaultBindings)
    1.11      self._makeFunction()
    1.12  
    1.13 @@ -39,6 +40,7 @@
    1.14  # If filepath exists, it is used instead of the meta_type.
    1.15  # If not, the meta type is used as before.
    1.16  def _compile(self):
    1.17 +    
    1.18      fp = getattr(self, '_filepath', self.meta_type)
    1.19      bind_names = self.getBindingAssignments().getAssignedNamesInOrder()
    1.20      r = self._compiler(self._params, self._body or 'pass',