Skip to content

Commit 08be789

Browse files
committed
Merge in main branch, pastebin confirmation
2 parents 047d831 + 68ed4f5 commit 08be789

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
v0.9.7
5+
------
6+
7+
* Pastebin confirmation added; we were getting a lot of people accidentally
8+
pastebinning sensitive information so I think this is a good idea.
9+
410
v0.9.6.2
511
--------
612
Unfortunately another bugfix release as I (Bob) broke py3 support.

bpython/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,8 +1218,8 @@ def undo(self, n=1):
12181218

12191219
def writetb(self, lines):
12201220
for line in lines:
1221-
self.echo('\x01%s\x03%s' % (self.config.color_scheme['error'],
1222-
line))
1221+
self.write('\x01%s\x03%s' % (self.config.color_scheme['error'],
1222+
line))
12231223

12241224
def yank_from_buffer(self):
12251225
"""Paste the text from the cut buffer at the current cursor location"""

bpython/repl.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,12 @@ def write2file(self):
625625
def pastebin(self):
626626
"""Upload to a pastebin and display the URL in the status bar."""
627627

628+
if not self.statusbar.prompt("Pastebin buffer? (y/N) "
629+
).lower().startswith('y'
630+
):
631+
self.statusbar.message("Pastebin aborted")
632+
return
633+
628634
pasteservice = ServerProxy(self.config.pastebin_url)
629635

630636
s = self.getstdout()

0 commit comments

Comments
 (0)