Skip to content

Commit 9d397f6

Browse files
author
Sebastian Ramacher
committed
Split pastebin into pastebin and do_pastebin.
urwid's Interaction won't return the result from confirm immediatly. So we need to be able to perform the pastebin without user interaction.
1 parent 545ca24 commit 9d397f6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bpython/repl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,10 @@ def pastebin(self, s=None):
748748
not self.interact.confirm("Pastebin buffer? (y/N) ")):
749749
self.interact.notify("Pastebin aborted")
750750
return
751+
return self.do_pastebin(s)
751752

753+
def do_pastebin(self, s):
754+
"""Actually perform the upload."""
752755
try:
753756
pasteservice = ServerProxy(self.config.pastebin_url)
754757
except IOError, e:

0 commit comments

Comments
 (0)