Skip to content

Commit a0746ca

Browse files
committed
Create option for private pastebins, default to always post private. This should alleviate the need to remove pastes.
1 parent 2fa3eca commit a0746ca

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

bpython/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def loadini(struct, configfile):
6868
'pastebin_confirm': True,
6969
'pastebin_private': False,
7070
'pastebin_url': 'http://bpaste.net/xmlrpc/',
71+
'pastebin_private': True,
7172
'pastebin_show_url': 'http://bpaste.net/show/$paste_id/',
7273
},
7374
'keyboard': {
@@ -134,6 +135,7 @@ def loadini(struct, configfile):
134135
struct.pastebin_confirm = config.getboolean('general', 'pastebin_confirm')
135136
struct.pastebin_private = config.getboolean('general', 'pastebin_private')
136137
struct.pastebin_url = config.get('general', 'pastebin_url')
138+
struct.pastebin_private = config.get('general', 'pastebin_private')
137139
struct.pastebin_show_url = config.get('general', 'pastebin_show_url')
138140

139141
struct.cli_suggestion_width = config.getfloat('cli',

bpython/repl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,8 @@ def do_pastebin(self, s):
790790

791791
self.interact.notify('Posting data to pastebin...')
792792
try:
793-
paste_id = pasteservice.pastes.newPaste('pycon', s)
793+
paste_id = pasteservice.pastes.newPaste('pycon', s, '', '', '',
794+
self.config.pastebin_private)
794795
except (SocketError, XMLRPCError), e:
795796
self.interact.notify('Upload failed: %s' % (str(e), ) )
796797
return

0 commit comments

Comments
 (0)