diff options
author | orivej <[email protected]> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/tools/cython/Cython/Debugger/DebugWriter.py | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Debugger/DebugWriter.py')
-rw-r--r-- | contrib/tools/cython/Cython/Debugger/DebugWriter.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/tools/cython/Cython/Debugger/DebugWriter.py b/contrib/tools/cython/Cython/Debugger/DebugWriter.py index a5f30e88507..876a3a2169a 100644 --- a/contrib/tools/cython/Cython/Debugger/DebugWriter.py +++ b/contrib/tools/cython/Cython/Debugger/DebugWriter.py @@ -1,4 +1,4 @@ -from __future__ import absolute_import +from __future__ import absolute_import import os import sys @@ -15,9 +15,9 @@ except ImportError: try: from xml.etree import ElementTree as etree except ImportError: - etree = None + etree = None -from ..Compiler import Errors +from ..Compiler import Errors class CythonDebugWriter(object): @@ -32,7 +32,7 @@ class CythonDebugWriter(object): if etree is None: raise Errors.NoElementTreeInstalledException() - self.output_dir = os.path.join(output_dir or os.curdir, 'cython_debug') + self.output_dir = os.path.join(output_dir or os.curdir, 'cython_debug') self.tb = etree.TreeBuilder() # set by Cython.Compiler.ParseTreeTransforms.DebugTransform self.module_name = None @@ -44,10 +44,10 @@ class CythonDebugWriter(object): def end(self, name): self.tb.end(name) - def add_entry(self, name, **attrs): - self.tb.start(name, attrs) - self.tb.end(name) - + def add_entry(self, name, **attrs): + self.tb.start(name, attrs) + self.tb.end(name) + def serialize(self): self.tb.end('Module') self.tb.end('cython_debug') @@ -55,7 +55,7 @@ class CythonDebugWriter(object): try: os.makedirs(self.output_dir) - except OSError as e: + except OSError as e: if e.errno != errno.EEXIST: raise |