'Return the type of a repository or Folder as string.
(IMAP, Gmail, Maildir, etc...)'

def getnicename(self, object):

    prelimname = object.__class__.__name__.split('.')[(-1)]
    return re.sub('(Folder|Repository)', '', prelimname)
