mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-08 21:53:36 +00:00
showLabels handle non-Gmail users
This commit is contained in:
@ -4534,7 +4534,8 @@ def showLabels(users):
|
|||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
for user in users:
|
for user in users:
|
||||||
gmail = buildGAPIServiceObject(u'gmail', user)
|
gmail = buildGAPIServiceObject(u'gmail', user)
|
||||||
labels = callGAPI(service=gmail.users().labels(), function=u'list', userId=user)
|
labels = callGAPI(service=gmail.users().labels(), function=u'list', userId=user, soft_errors=True)
|
||||||
|
if labels:
|
||||||
for label in labels[u'labels']:
|
for label in labels[u'labels']:
|
||||||
if label[u'type'] == u'system' and not show_system:
|
if label[u'type'] == u'system' and not show_system:
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user