catch additional errors on guardian delete

This commit is contained in:
Jay Lee
2016-10-12 11:53:37 -04:00
parent 2368adfebd
commit cdc72d2f23

View File

@ -2361,7 +2361,7 @@ def doDeleteGuardian():
guardianId = sys.argv[3] guardianId = sys.argv[3]
studentId = sys.argv[4] studentId = sys.argv[4]
try: 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) print u'Deleted %s as a guardian of %s' % (guardianId, studentId)
except googleapiclient.errors.HttpError: except googleapiclient.errors.HttpError:
# See if there's a pending invitation # See if there's a pending invitation