diff options
author | orivej <[email protected]> | 2022-02-10 16:44:49 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:49 +0300 |
commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/tools/cython/Cython/Debugger/DebugWriter.py | |
parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 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 876a3a2169a..a5f30e88507 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 |