diff options
| author | Aleksandr <[email protected]> | 2022-02-10 16:47:52 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:52 +0300 | 
| commit | ea6c5b7f172becca389cacaff7d5f45f6adccbe6 (patch) | |
| tree | d16cef493ac1e092b4a03ab9437ec06ffe3d188f /contrib/tools/cython/Cython/Debugger/libcython.py | |
| parent | 37de222addabbef336dcaaea5f7c7645a629fc6d (diff) | |
Restoring authorship annotation for Aleksandr <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Debugger/libcython.py')
| -rw-r--r-- | contrib/tools/cython/Cython/Debugger/libcython.py | 28 | 
1 files changed, 14 insertions, 14 deletions
diff --git a/contrib/tools/cython/Cython/Debugger/libcython.py b/contrib/tools/cython/Cython/Debugger/libcython.py index 23153789b66..b47d63f2895 100644 --- a/contrib/tools/cython/Cython/Debugger/libcython.py +++ b/contrib/tools/cython/Cython/Debugger/libcython.py @@ -18,13 +18,13 @@ import collections  import gdb -try:  # python 2 -    UNICODE = unicode -    BYTES = str -except NameError:  # python 3 -    UNICODE = str -    BYTES = bytes - +try:  # python 2  +    UNICODE = unicode  +    BYTES = str  +except NameError:  # python 3  +    UNICODE = str  +    BYTES = bytes  +   try:      from lxml import etree      have_lxml = True @@ -488,7 +488,7 @@ class SourceFileDescriptor(object):  class CyGDBError(gdb.GdbError):      """ -    Base class for Cython-command related errors +    Base class for Cython-command related errors       """      def __init__(self, *args): @@ -696,8 +696,8 @@ class CyImport(CythonCommand):      completer_class = gdb.COMPLETE_FILENAME      def invoke(self, args, from_tty): -        if isinstance(args, BYTES): -            args = args.decode(_filesystemencoding) +        if isinstance(args, BYTES):  +            args = args.decode(_filesystemencoding)           for arg in string_to_argv(args):              try:                  f = open(arg) @@ -842,9 +842,9 @@ class CyBreak(CythonCommand):                  gdb.execute('break %s' % func.pf_cname)      def invoke(self, function_names, from_tty): -        if isinstance(function_names, BYTES): -            function_names = function_names.decode(_filesystemencoding) -        argv = string_to_argv(function_names) +        if isinstance(function_names, BYTES):  +            function_names = function_names.decode(_filesystemencoding)  +        argv = string_to_argv(function_names)           if function_names.startswith('-p'):              argv = argv[1:]              python_breakpoints = True @@ -900,7 +900,7 @@ class CythonInfo(CythonBase, libpython.PythonInfo):      def lineno(self, frame):          # Take care of the Python and Cython levels. We need to care for both -        # as we can't simply dispatch to 'py-step', since that would work for +        # as we can't simply dispatch to 'py-step', since that would work for           # stepping through Python code, but it would not step back into Cython-          # related code. The C level should be dispatched to the 'step' command.          if self.is_cython_function(frame):  | 
