From 822c8daf070425ca5267fe5eead0821bccb5cb55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 28 Jun 2016 15:00:14 +0200 Subject: [PATCH] Gracefully handle use of sync feature without home project access. This is for people that aren't part of the AB-testing group, who still used this version of the addon. --- blender_cloud/settings_sync.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/blender_cloud/settings_sync.py b/blender_cloud/settings_sync.py index fc166b0..235c4cd 100644 --- a/blender_cloud/settings_sync.py +++ b/blender_cloud/settings_sync.py @@ -79,7 +79,10 @@ async def get_home_project(params=None) -> pillarsdk.Project: HOME_PROJECT_ENDPOINT, params=params) except sdk_exceptions.ForbiddenAccess: log.warning('Access to the home project was denied. ' - 'Double-check that you are a cloud subscriber and logged in.') + 'Double-check that you are logged in with valid BlenderID credentials.') + raise + except sdk_exceptions.ResourceNotFound: + log.warning('No home project available.') raise @@ -376,6 +379,10 @@ class PILLAR_OT_sync(pillar.PillarOperatorMixin, self.bss_report({'ERROR'}, 'Did not get access to home project.') self._state = 'QUIT' return + except sdk_exceptions.ResourceNotFound: + self.bss_report({'ERROR'}, 'Home project not found.') + self._state = 'QUIT' + return # Only create the folder structure if we're pushing. may_create = self.action == 'PUSH'