cloud-init icon indicating copy to clipboard operation
cloud-init copied to clipboard

fix(pdb): Enable running cloud-init under pdb

Open holmanb opened this issue 1 year ago • 1 comments

Proposed Commit Message

fix(pdb): Enable running cloud-init under pdb

Cloud-init closes stdin on startup, which breaks interactively running cloud-init under pdb.

Leave stdin open if it is connected to a tty, which fixes pdb use.


File "/usr/lib/python3.12/bdb.py", line 90, in trace_dispatch
  return self.dispatch_line(frame)
         ^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/bdb.py", line 115, in dispatch_line
    if self.quitting: raise BdbQuit
                      ^^^^^^^^^^^^^
bdb.BdbQuit
------------------------------------------------------------
The program exited via sys.exit(). Exit status: 1

Merge type

  • [x] Squash merge using "Proposed Commit Message"
  • [ ] Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

holmanb avatar Apr 25 '24 22:04 holmanb

Thanks for this. I ran into this issue when trying to debug some issues.

CalvoM avatar Apr 26 '24 09:04 CalvoM

@TheRealFalcon @CalvoM Thanks for the reviews! I think I've addressed all of the comments, requesting re-review.

holmanb avatar May 02 '24 22:05 holmanb