File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 3535from glob import glob
3636from itertools import takewhile
3737from locale import getpreferredencoding
38+ from socket import error as socketerror
3839from string import Template
3940from urllib import quote as urlquote
4041from xmlrpclib import ServerProxy , Error as XMLRPCError
@@ -713,8 +714,8 @@ def pastebin(self, s=None):
713714 self .interact .notify ('Posting data to pastebin...' )
714715 try :
715716 paste_id = pasteservice .pastes .newPaste ('pycon' , s )
716- except XMLRPCError , e :
717- self .interact .notify ('Upload failed: %s' % ( str ( e ), ) )
717+ except ( XMLRPCError , socketerror ) , e :
718+ self .interact .notify ('Upload failed: %s' % e )
718719 return
719720
720721 paste_url_template = Template (self .config .pastebin_show_url )
You can’t perform that action at this time.
0 commit comments