mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-08 13:43:35 +00:00
showLabels handle non-Gmail users
This commit is contained in:
19
src/gam.py
19
src/gam.py
@ -4534,16 +4534,17 @@ 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)
|
||||||
for label in labels[u'labels']:
|
if labels:
|
||||||
if label[u'type'] == u'system' and not show_system:
|
for label in labels[u'labels']:
|
||||||
continue
|
if label[u'type'] == u'system' and not show_system:
|
||||||
print convertUTF8(label[u'name'])
|
|
||||||
for a_key in label:
|
|
||||||
if a_key == u'name':
|
|
||||||
continue
|
continue
|
||||||
print u' %s: %s' % (a_key, label[a_key])
|
print convertUTF8(label[u'name'])
|
||||||
print u''
|
for a_key in label:
|
||||||
|
if a_key == u'name':
|
||||||
|
continue
|
||||||
|
print u' %s: %s' % (a_key, label[a_key])
|
||||||
|
print u''
|
||||||
|
|
||||||
def showGmailProfile(users):
|
def showGmailProfile(users):
|
||||||
todrive = False
|
todrive = False
|
||||||
|
Reference in New Issue
Block a user