From a8682c6c27f5297ab2f3ea9365eba141d1e4c7c1 Mon Sep 17 00:00:00 2001 From: AuroraWright Date: Fri, 15 Sep 2023 12:42:30 +0200 Subject: [PATCH] Fix some Azure code not being indented properly --- .DS_Store | Bin 6148 -> 6148 bytes manga_ocr/ocr.py | 18 +++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.DS_Store b/.DS_Store index 42365085b6d59be3adf8479287013d2dc26690ca..f4bfcdbee75e8d293892d4007ceae6413be7fe07 100644 GIT binary patch delta 33 ocmZoMXffEZh)KlU+*C)w*u=P2N1@u%$UsNI#L{Tg+ziMzFxk9~$xjpjpOy&s diff --git a/manga_ocr/ocr.py b/manga_ocr/ocr.py index 051fb7d..5552afc 100644 --- a/manga_ocr/ocr.py +++ b/manga_ocr/ocr.py @@ -173,15 +173,15 @@ class AzureComputerVision: else: logger.info(f'Parsing Azure credentials') azure_credentials_file = os.path.join(os.path.expanduser('~'),'.config','azure_computer_vision.ini') - try: - azure_credentials = configparser.ConfigParser() - azure_credentials.read(azure_credentials_file) - self.client = ComputerVisionClient(azure_credentials['config']['endpoint'], CognitiveServicesCredentials(azure_credentials['config']['api_key'])) - self.available = True - logger.info('Azure Computer Vision ready') - except: - logger.warning('Error parsing Azure credentials, Azure Computer Vision will not work!') - self.available = False + try: + azure_credentials = configparser.ConfigParser() + azure_credentials.read(azure_credentials_file) + self.client = ComputerVisionClient(azure_credentials['config']['endpoint'], CognitiveServicesCredentials(azure_credentials['config']['api_key'])) + self.available = True + logger.info('Azure Computer Vision ready') + except: + logger.warning('Error parsing Azure credentials, Azure Computer Vision will not work!') + self.available = False def __call__(self, img_or_path): if not self.available: