X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/169f7ff844a016039e1d5aa6205fc951df7d0b53..69659a8281d4aeac3476820299f26a09dd285996:/tools/appveyor-irc-notify.py diff --git a/tools/appveyor-irc-notify.py b/tools/appveyor-irc-notify.py index e4795f0f11..3a84ebb54c 100644 --- a/tools/appveyor-irc-notify.py +++ b/tools/appveyor-irc-notify.py @@ -33,7 +33,7 @@ expanded automatically, replaced with a corresponding Appveyor environment varia value. se commas to delineate multiple messages. Modified by Martin Quinson on June 2018: - + - Use OFTC instead of Freenode Example: @@ -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()