Skip to content

Commit 6ffb5de

Browse files
committed
Fix traceback with ^d.
1 parent 02d9984 commit 6ffb5de

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bpython/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def __init__(self, scr, interp, statusbar, config, idle=None):
321321
self.list_win = newwin(get_colpair(config, 'background'), 1, 1, 1, 1)
322322
self.cpos = 0
323323
self.do_exit = False
324-
self.exit_value = None
324+
self.exit_value = ()
325325
self.f_string = ''
326326
self.idle = idle
327327
self.in_hist = False
@@ -1120,7 +1120,7 @@ def repl(self):
11201120

11211121
self.scr.redrawwin()
11221122
if self.do_exit:
1123-
return
1123+
return self.exit_value
11241124

11251125
self.history.append(inp)
11261126
self.s_hist[-1] += self.f_string

bpython/gtk_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def __init__(self, interpreter, config):
336336
gtk.TextView.__init__(self)
337337
repl.Repl.__init__(self, interpreter, config)
338338
self.interp.writetb = self.writetb
339-
self.exit_value = None
339+
self.exit_value = ()
340340
self.editing = Nested()
341341
self.reset_indent = False
342342
self.modify_font(pango.FontDescription(self.config.gtk_font))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy