gh-90095: Ignore empty lines and comments in .pdbrc (#116834)

This commit is contained in:
Tian Gao 2024-03-15 02:36:04 -07:00 committed by GitHub
parent 8fc8fbb43a
commit a50cf6c3d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 26 additions and 2 deletions

View file

@ -364,7 +364,10 @@ class Pdb(bdb.Bdb, cmd.Cmd):
)
if self.rcLines:
self.cmdqueue = self.rcLines
self.cmdqueue = [
line for line in self.rcLines
if line.strip() and not line.strip().startswith("#")
]
self.rcLines = []
# Override Bdb methods