zope2/ScriptDebugging

changeset 11:88e0748d0bc5 tip

The patching got some indentation wrong
author lregebro
date Thu, 24 Feb 2005 11:21:51 +0000
parents a33284e83d4d
children
files __init__.py
diffstat 1 files changed, 27 insertions(+), 27 deletions(-) [+]
line diff
     1.1 --- a/__init__.py
     1.2 +++ b/__init__.py
     1.3 @@ -193,37 +193,37 @@
     1.4      
     1.5      # Now includes the filepath
     1.6      def _createZODBClone(self):
     1.7 -    """Create a ZODB (editable) equivalent of this object."""
     1.8 -    obj = PythonScript(self.getId(), expandpath(self._filepath))
     1.9 -    obj.write(self.read())
    1.10 -    return obj
    1.11 +        """Create a ZODB (editable) equivalent of this object."""
    1.12 +        obj = PythonScript(self.getId(), expandpath(self._filepath))
    1.13 +        obj.write(self.read())
    1.14 +        return obj
    1.15  
    1.16      FSPythonScript._createZODBClone = _createZODBClone
    1.17  
    1.18      # Now includes the file path
    1.19      def _write(self, text, compile):
    1.20 -    '''
    1.21 -    Parses the source, storing the body, params, title, bindings,
    1.22 -    and source in self.  If compile is set, compiles the
    1.23 -    function.
    1.24 -    '''
    1.25 -    ps = PythonScript(self.id, expandpath(self._filepath))
    1.26 -    ps.write(text)
    1.27 -    if compile:
    1.28 -        ps._makeFunction(1)
    1.29 -        self._v_f = f = ps._v_f
    1.30 -        if f is not None:
    1.31 -            self.func_code = f.func_code
    1.32 -            self.func_defaults = f.func_defaults
    1.33 -        else:
    1.34 -            # There were errors in the compile.
    1.35 -            # No signature.
    1.36 -            self.func_code = bad_func_code()
    1.37 -            self.func_defaults = None
    1.38 -    self._body = ps._body
    1.39 -    self._params = ps._params
    1.40 -    self.title = ps.title
    1.41 -    self._setupBindings(ps.getBindingAssignments().getAssignedNames())
    1.42 -    self._source = ps.read()  # Find out what the script sees.
    1.43 +        '''
    1.44 +        Parses the source, storing the body, params, title, bindings,
    1.45 +        and source in self.  If compile is set, compiles the
    1.46 +        function.
    1.47 +        '''
    1.48 +        ps = PythonScript(self.id, expandpath(self._filepath))
    1.49 +        ps.write(text)
    1.50 +        if compile:
    1.51 +            ps._makeFunction(1)
    1.52 +            self._v_f = f = ps._v_f
    1.53 +            if f is not None:
    1.54 +                self.func_code = f.func_code
    1.55 +                self.func_defaults = f.func_defaults
    1.56 +            else:
    1.57 +                # There were errors in the compile.
    1.58 +                # No signature.
    1.59 +                self.func_code = bad_func_code()
    1.60 +                self.func_defaults = None
    1.61 +        self._body = ps._body
    1.62 +        self._params = ps._params
    1.63 +        self.title = ps.title
    1.64 +        self._setupBindings(ps.getBindingAssignments().getAssignedNames())
    1.65 +        self._source = ps.read()  # Find out what the script sees.
    1.66  
    1.67      FSPythonScript._write =_write