From cdc72d2f231b50a2a1768459e58c44b6e7cfdc86 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Wed, 12 Oct 2016 11:53:37 -0400 Subject: [PATCH] catch additional errors on guardian delete --- src/gam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gam.py b/src/gam.py index 51df3e0a..ba1e540f 100755 --- a/src/gam.py +++ b/src/gam.py @@ -2361,7 +2361,7 @@ def doDeleteGuardian(): guardianId = sys.argv[3] studentId = sys.argv[4] try: - callGAPI(croom.userProfiles().guardians(), u'delete', throw_reasons=[u'notFound'], studentId=studentId, guardianId=guardianId) + callGAPI(croom.userProfiles().guardians(), u'delete', throw_reasons=[u'forbidden', u'notFound'], studentId=studentId, guardianId=guardianId) print u'Deleted %s as a guardian of %s' % (guardianId, studentId) except googleapiclient.errors.HttpError: # See if there's a pending invitation