X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9b88ca210d5b5f945c24376f41f39820417b11f3..e2f5c066d692d8a974d15f72e63870325e6edc7e:/tools/appveyor-irc-notify.py diff --git a/tools/appveyor-irc-notify.py b/tools/appveyor-irc-notify.py index 84b70b7f4c..3a84ebb54c 100644 --- a/tools/appveyor-irc-notify.py +++ b/tools/appveyor-irc-notify.py @@ -62,7 +62,11 @@ in Appveyor's YAML: """ -import random, socket, ssl, sys, time +import random +import socket +import ssl +import sys +import time def appveyor_vars(): @@ -142,7 +146,7 @@ if __name__ == '__main__': try: # establish connection - irc_sock = ssl.wrap_socket(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) + irc_sock = ssl.wrap_socket(socket.socket(socket.AF_INET, socket.SOCK_STREAM), ssl_version=ssl.PROTOCOL_TLS) irc_sock.connect((socket.gethostbyname('irc.oftc.net'), 6697)) irc_sock.send('NICK {0}\r\nUSER {0} * 0 :{0}\r\n'.format(irc_username).encode('utf_8')) irc_file = irc_sock.makefile() @@ -170,7 +174,7 @@ if __name__ == '__main__': # leave the channel irc_sock.send('PART #{}\r\n'.format(channel).encode('utf_8')) sys.exit() - except: + except Exception: e = sys.exc_info()[0] print(e) sys.exit()