# HG changeset patch # User Sebastian Ramacher # Date 1327774613 -3600 # Node ID 1f8c00a6dd68be94af669548066b2cde592b2930 # Parent e936bd4e71e57804b176af420205bb2934741e25 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. diff -r e936bd4e71e57804b176af420205bb2934741e25 -r 1f8c00a6dd68be94af669548066b2cde592b2930 bpython/repl.py --- a/bpython/repl.py Wed Jan 25 18:01:30 2012 +0100 +++ b/bpython/repl.py Sat Jan 28 19:16:53 2012 +0100 @@ -748,7 +748,10 @@ not self.interact.confirm("Pastebin buffer? (y/N) ")): self.interact.notify("Pastebin aborted") return + return self.do_pastebin(s) + def do_pastebin(self, s): + """Actually perform the upload.""" try: pasteservice = ServerProxy(self.config.pastebin_url) except IOError, e: