Skip to content

Commit 828d1e7

Browse files
style: reformat raise statement for readability
Co-Authored-By: Vojta Tuma <vojta.tuma@keboola.com>
1 parent b7d0443 commit 828d1e7

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/component.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ def _get_client(self, account_params: Account) -> OneDriveClient:
102102
except OneDriveClientException as e:
103103
last_error = e
104104
logging.warning(f"Refresh token failed: {e}")
105-
raise UserException(str(last_error)) if last_error else \
106-
UserException('Authentication failed, reauthorize the extractor in extractor configuration!')
105+
if last_error:
106+
raise UserException(str(last_error))
107+
raise UserException(
108+
'Authentication failed, reauthorize the extractor in extractor configuration!'
109+
)
107110

108111
def _get_refresh_tokens(self) -> list[str]:
109112
state_file = self.get_state_file()

0 commit comments

Comments
 (0)