mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
check existence of credentials before testing session
This commit is contained in:
parent
3133ff0e0b
commit
a30a5088f3
1 changed files with 10 additions and 0 deletions
|
|
@ -37,6 +37,16 @@ def check_url(url):
|
|||
return url
|
||||
|
||||
def validate_credentials(url, user, api):
|
||||
first_validation = True
|
||||
if not user:
|
||||
log.error('Ftrack Username is not set! Exiting.')
|
||||
first_validation = False
|
||||
if not api:
|
||||
log.error('Ftrack API key is not set! Exiting.')
|
||||
first_validation = False
|
||||
if not first_validation:
|
||||
return False
|
||||
|
||||
try:
|
||||
session = ftrack_api.Session(
|
||||
server_url=url,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue