Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:GA
fence-agents.35184
0001-fence_azure_arm-fix-get-virtual-machines-c...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-fence_azure_arm-fix-get-virtual-machines-call.patch of Package fence-agents.35184
--- a/agents/azure_arm/fence_azure_arm.py-orig 2024-07-04 12:34:38.266079588 +0200 +++ b/agents/azure_arm/fence_azure_arm.py 2024-07-04 12:38:01.867756816 +0200 @@ -1,5 +1,18 @@ -#!@PYTHON@ -tt +#!/bin/sh +# Next line is bilingual: it starts a comment in Python, and is a no-op in shell +""":" + +# Find a suitable python interpreter. Look for python3.11 first and fallback to python otherwise +for cmd in python3 python ; do + command -v > /dev/null $cmd && exec $cmd $0 "$@" +done + +echo "python not found" >2 + +exit 1 + +":""" import sys, re, pexpect import logging import atexit @@ -74,7 +87,10 @@ try: vmStatus = compute_client.virtual_machines.get(rgName, vmName, "instanceView") except Exception as e: - fail_usage("Failed: %s" % e) + try: + vmStatus = compute_client.virtual_machines.get(rgName, vmName, expand="instanceView") + except Exception as e: + fail_usage("Failed: %s" % e) for status in vmStatus.instance_view.statuses: if status.code.startswith("PowerState"):
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor