diff -r 57875cf423c9 -r 2372284d9457 contrib/automation/hgautomation/winrm.py --- a/contrib/automation/hgautomation/winrm.py Sat Oct 05 10:29:34 2019 -0400 +++ b/contrib/automation/hgautomation/winrm.py Sun Oct 06 09:45:02 2019 -0400 @@ -11,9 +11,7 @@ import pprint import time -from pypsrp.client import ( - Client, -) +from pypsrp.client import Client from pypsrp.powershell import ( PowerShell, PSInvocationState, @@ -35,8 +33,13 @@ while True: try: - client = Client(host, username=username, password=password, - ssl=ssl, connection_timeout=5) + client = Client( + host, + username=username, + password=password, + ssl=ssl, + connection_timeout=5, + ) client.execute_ps("Write-Host 'Hello, World!'") return client except requests.exceptions.ConnectionError: @@ -78,5 +81,7 @@ print(format_object(o)) if ps.state == PSInvocationState.FAILED: - raise Exception('PowerShell execution failed: %s' % - ' '.join(map(format_object, ps.streams.error))) + raise Exception( + 'PowerShell execution failed: %s' + % ' '.join(map(format_object, ps.streams.error)) + )