File acc_avoid_httpstatus.patch of Package azure-cli-core.28525
diff -Nru azure-cli-core-2.17.1.orig/azure/cli/core/command_recommender.py azure-cli-core-2.17.1/azure/cli/core/command_recommender.py
--- azure-cli-core-2.17.1.orig/azure/cli/core/command_recommender.py 2020-12-31 09:24:48.000000000 +0100
+++ azure-cli-core-2.17.1/azure/cli/core/command_recommender.py 2023-03-11 02:30:35.019606978 +0100
@@ -75,7 +75,6 @@
import json
import requests
from requests import RequestException
- from http import HTTPStatus
from azure.cli.core import __version__ as version
api_url = 'https://app.aladdin.microsoft.com/api/v1.0/suggestions'
@@ -125,7 +124,7 @@
telemetry.set_debug_info('AladdinException', ex.__class__.__name__)
recommendations = []
- if response and response.status_code == HTTPStatus.OK:
+ if response and response.status_code == 200: # HTTPStatus.OK
for result in response.json():
# parse the response and format the recommendation
command, parameters, placeholders = result['command'],\