def _infoCalendarACLs(cal, entityType, calId, j, jcount, ruleIds, kcount):
Ind.Increment()
k = 0
for ruleId in ruleIds:
k += 1
ruleId = normalizeRuleId(ruleId)
try:
result = callGAPI(cal.acl(), u'get',
throw_reasons=[GAPI.NOT_FOUND, GAPI.INVALID, GAPI.INVALID_SCOPE_VALUE, GAPI.FORBIDDEN],
calendarId=calId, ruleId=ruleId, fields=u'id,role')
printEntity([entityType, calId, Ent.CALENDAR_ACL, formatACLScopeRole(result[u'id'], result[u'role'])], k, kcount)
except (GAPI.notFound, GAPI.invalid) as e:
if not checkCalendarExists(cal, calId):
entityUnknownWarning(entityType, calId, j, jcount)
break
else:
entityActionFailedWarning([entityType, calId, Ent.CALENDAR_ACL, formatACLScopeRole(ruleId, None)], str(e), k, kcount)
except (GAPI.invalidScopeValue, GAPI.forbidden) as e:
entityActionFailedWarning([entityType, calId, Ent.CALENDAR_ACL, formatACLScopeRole(ruleId, None)], str(e), k, kcount)
Ind.Decrement()
评论列表
文章目录