Fix some Azure code not being indented properly
This commit is contained in:
@@ -173,15 +173,15 @@ class AzureComputerVision:
|
|||||||
else:
|
else:
|
||||||
logger.info(f'Parsing Azure credentials')
|
logger.info(f'Parsing Azure credentials')
|
||||||
azure_credentials_file = os.path.join(os.path.expanduser('~'),'.config','azure_computer_vision.ini')
|
azure_credentials_file = os.path.join(os.path.expanduser('~'),'.config','azure_computer_vision.ini')
|
||||||
try:
|
try:
|
||||||
azure_credentials = configparser.ConfigParser()
|
azure_credentials = configparser.ConfigParser()
|
||||||
azure_credentials.read(azure_credentials_file)
|
azure_credentials.read(azure_credentials_file)
|
||||||
self.client = ComputerVisionClient(azure_credentials['config']['endpoint'], CognitiveServicesCredentials(azure_credentials['config']['api_key']))
|
self.client = ComputerVisionClient(azure_credentials['config']['endpoint'], CognitiveServicesCredentials(azure_credentials['config']['api_key']))
|
||||||
self.available = True
|
self.available = True
|
||||||
logger.info('Azure Computer Vision ready')
|
logger.info('Azure Computer Vision ready')
|
||||||
except:
|
except:
|
||||||
logger.warning('Error parsing Azure credentials, Azure Computer Vision will not work!')
|
logger.warning('Error parsing Azure credentials, Azure Computer Vision will not work!')
|
||||||
self.available = False
|
self.available = False
|
||||||
|
|
||||||
def __call__(self, img_or_path):
|
def __call__(self, img_or_path):
|
||||||
if not self.available:
|
if not self.available:
|
||||||
|
|||||||
Reference in New Issue
Block a user