summaryrefslogtreecommitdiffstats
path: root/contrib/tools/cython/Cython/Debugger/Cygdb.py
diff options
context:
space:
mode:
authorAleksandr <[email protected]>2022-02-10 16:47:52 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:47:52 +0300
commitb05913d1c3c02a773578bceb7285084d2933ae86 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c /contrib/tools/cython/Cython/Debugger/Cygdb.py
parentea6c5b7f172becca389cacaff7d5f45f6adccbe6 (diff)
Restoring authorship annotation for Aleksandr <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Debugger/Cygdb.py')
-rw-r--r--contrib/tools/cython/Cython/Debugger/Cygdb.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/contrib/tools/cython/Cython/Debugger/Cygdb.py b/contrib/tools/cython/Cython/Debugger/Cygdb.py
index b71ba44d8ee..45f31ce6f77 100644
--- a/contrib/tools/cython/Cython/Debugger/Cygdb.py
+++ b/contrib/tools/cython/Cython/Debugger/Cygdb.py
@@ -138,21 +138,21 @@ def main(path_to_debug_info=None, gdb_argv=None, no_import=False):
tempfilename = make_command_file(path_to_debug_info, no_import=no_import)
logger.info("Launching %s with command file: %s and gdb_argv: %s",
options.gdb, tempfilename, gdb_argv)
- with open(tempfilename) as tempfile:
- logger.debug('Command file (%s) contains: """\n%s"""', tempfilename, tempfile.read())
- logger.info("Spawning %s...", options.gdb)
- p = subprocess.Popen([options.gdb, '-command', tempfilename] + gdb_argv)
- logger.info("Spawned %s (pid %d)", options.gdb, p.pid)
- while True:
- try:
- logger.debug("Waiting for gdb (pid %d) to exit...", p.pid)
- ret = p.wait()
- logger.debug("Wait for gdb (pid %d) to exit is done. Returned: %r", p.pid, ret)
- except KeyboardInterrupt:
- pass
- else:
- break
- logger.debug("Closing temp command file with fd: %s", tempfile.fileno())
+ with open(tempfilename) as tempfile:
+ logger.debug('Command file (%s) contains: """\n%s"""', tempfilename, tempfile.read())
+ logger.info("Spawning %s...", options.gdb)
+ p = subprocess.Popen([options.gdb, '-command', tempfilename] + gdb_argv)
+ logger.info("Spawned %s (pid %d)", options.gdb, p.pid)
+ while True:
+ try:
+ logger.debug("Waiting for gdb (pid %d) to exit...", p.pid)
+ ret = p.wait()
+ logger.debug("Wait for gdb (pid %d) to exit is done. Returned: %r", p.pid, ret)
+ except KeyboardInterrupt:
+ pass
+ else:
+ break
+ logger.debug("Closing temp command file with fd: %s", tempfile.fileno())
logger.debug("Removing temp command file: %s", tempfilename)
os.remove(tempfilename)
logger.debug("Removed temp command file: %s", tempfilename)