Comment 5 for bug 802836

Revision history for this message
Thomas Tanghus (tanghus) wrote :

BTW: I tried lp:~cfraire/backup-gmail/devel but it fails with:

Traceback (most recent call last):
  File "/home/tol/devel/backup_gmail.py", line 778, in <module>
    gbackup.execute()
  File "/home/tol/devel/backup_gmail.py", line 438, in execute
    include_labels = self.__fetchDefaultLabels()
  File "/home/tol/devel/backup_gmail.py", line 387, in __fetchDefaultLabels
    allMail = specials['AllMail'] # no space
KeyError: 'AllMail'

I tried to replace 'AllMail' with 'All' and 'all' just to try something but it still failed with a KeyError.

I then commented out that section:

 # Fetch default Gmail folders excluding the special \Drafts and \Trash
 def __fetchDefaultLabels(self):
  labels = self.fetchLabelNames()
  specials = self.fetchSpecialLabels()
  #allMail = specials['AllMail'] # no space
  #if allMail not in labels:
  # labels.append(allMail)
  ignore = [ specials['Drafts'], specials['Trash'] ]
  labels = filter(lambda x : x not in ignore , labels)
  return labels

Then the initial and afterwards incremental backup succeeded but created no .mbox files for the labels.