'set all uids mails the flag as seen'

def update_flag(self, uid_list={}):

    if (not uid_list):
        return
    if (not self.connect()):
        return
    self.imap.select(u'Inbox')
    for (uid, operation) in iteritems(uid_list):
        if (not uid):
            continue
        op = (u'+FLAGS' if (operation == u'Read') else u'-FLAGS')
        try:
            self.imap.uid(u'STORE', uid, op, u'(\\SEEN)')
        except Exception as e:
            continue
