X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2920f7e93ef03e396c8ba33de4ab2519772af7a5..84e824746638f2b4c32c315bcfce655098d4e80b:/tools/appveyor-irc-notify.py diff --git a/tools/appveyor-irc-notify.py b/tools/appveyor-irc-notify.py index a83bbaf6ef..463104f386 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,12 +62,16 @@ in Appveyor's YAML: """ -import os, random, socket, ssl, sys, time +import random +import socket +import ssl +import sys +import time def appveyor_vars(): """ - Return a dict of key value carfted from appveyor environment variables. + Return a dict of key value crafted from appveyor environment variables. """ from os import environ @@ -93,7 +97,7 @@ def appveyor_vars(): build_url = '{appveyor_url}/project/{account_name}/{project_slug}/build/{build_version}'.format(**locals()) commit_url = 'https://{repo_provider}.com/{repo_name}/commit/{commit}'.format(**locals()) - vars = dict( + apvy_vars = dict( appveyor_url=appveyor_url, account_name=account_name, project_name=project_name, @@ -125,7 +129,7 @@ def appveyor_vars(): underline='\x1f', plain='\x0f', ) - return vars + return apvy_vars if __name__ == '__main__': @@ -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 BaseException: e = sys.exc_info()[0] print(e) sys.exit()