
    #	h                     H    S SK r S SKr\R                  " \5      rSS jrS rg)    Nc                     [         R                  R                  SS5      R                  SS5      R	                  5       nU(       a  U$ U (       a  [        U 5      $ g )NREGION_NAME  )osenvirongetreplacelower_detect_region_of_azure_vm)http_clientregions     =/var/www/html/env/lib/python3.13/site-packages/msal/region.py_detect_regionr      sE    ZZ^^M2.66sB?EEGF)+66    c                     Sn[         R                  SR                  U5      5         U R                  USS0S9nUR                  R                  5       $ !   [         R                  SR                  U5      5         g = f)Nz\http://169.254.169.254/metadata/instance/compute/location?format=text&api-version=2021-01-01a7  Connecting to IMDS {}. It may take a while if you are running outside of Azure. You should consider opting in/out region behavior on-demand, by loading a boolean flag "is_deployed_in_azure" from your per-deployment config and then do "app = ConfidentialClientApplication(..., azure_region=is_deployed_in_azure)"Metadatatrue)headersz5IMDS {} unavailable. Perhaps not running in Azure VM?)loggerinfoformatr	   textstrip)r   urlresps      r   r   r      s~    	"  KK	. /5fSk;!sZ,@A yy  CJJ3O	Qs   A &A<)N)r   logging	getLogger__name__r   r   r    r   r   <module>r!      s%    	 			8	$!r   