We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5be60b6 commit 729f2eeCopy full SHA for 729f2ee
bpython/repl.py
@@ -35,6 +35,7 @@
35
from glob import glob
36
from itertools import takewhile
37
from locale import getpreferredencoding
38
+from socket import error as SocketError
39
from string import Template
40
from urllib import quote as urlquote
41
from xmlrpclib import ServerProxy, Error as XMLRPCError
@@ -713,7 +714,7 @@ def pastebin(self, s=None):
713
714
self.interact.notify('Posting data to pastebin...')
715
try:
716
paste_id = pasteservice.pastes.newPaste('pycon', s)
- except XMLRPCError, e:
717
+ except (SocketError, XMLRPCError), e:
718
self.interact.notify('Upload failed: %s' % (str(e), ) )
719
return
720
0 commit comments