Added checking credentials for settings sync

This commit is contained in:
2016-06-17 13:14:10 +02:00
parent ef822208c8
commit 483e847ffe
2 changed files with 45 additions and 13 deletions

View File

@@ -190,7 +190,7 @@ async def check_pillar_credentials():
try:
db_user = await pillar_call(pillarsdk.User.me)
except (pillarsdk.UnauthorizedAccess, pillarsdk.ResourceNotFound):
except (pillarsdk.UnauthorizedAccess, pillarsdk.ResourceNotFound, pillarsdk.ForbiddenAccess):
raise CredentialsNotSyncedError()
roles = db_user.roles
@@ -229,7 +229,7 @@ async def refresh_pillar_credentials():
# Test the new URL
_pillar_api = None
await check_pillar_credentials()
return await check_pillar_credentials()
async def get_project_uuid(project_url: str) -> str: