Skip to content

Commit

Permalink
Fix while statements with non-bool conditions in _pyrepl (#127509)
Browse files Browse the repository at this point in the history
Fix non-bool value conditions
  • Loading branch information
rruuaanng authored Jan 1, 2025
1 parent bb9d955 commit a327810
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Lib/_pyrepl/simple_interact.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def maybe_run_command(statement: str) -> bool:

return False

while 1:
while True:
try:
try:
sys.stdout.flush()
Expand Down
2 changes: 1 addition & 1 deletion Lib/_pyrepl/unix_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ def __tputs(self, fmt, prog=delayprog):
# only if the bps is actually needed (which I'm
# betting is pretty unlkely)
bps = ratedict.get(self.__svtermstate.ospeed)
while 1:
while True:
m = prog.search(fmt)
if not m:
os.write(self.output_fd, fmt)
Expand Down

0 comments on commit a327810

Please sign in to comment.