(self)
Edit expiration date of marked entry
Edit expiration date of marked entry
Edit expiration date of marked entry
def edit_date(self):
        '''Edit expiration date of marked entry'''

        exp = self.entries[self.e_highlight].expire.timetuple()
        exp_date = self.control.get_exp_date(exp[0], exp[1], exp[2])

        if exp_date == -1:
            self.close()
        elif exp_date is not False:
            if self.remote is True:
                uuid = self.entries[self.e_highlight].uuid
                last_mod = (self.entries[self.e_highlight]
                                .last_mod.timetuple())
                db_buf = self.client().set_e_exp(
                    str(exp_date[0]).encode(), str(exp_date[1]).encode(), 
                    str(exp_date[2]).encode(), uuid, last_mod)
                if self.check_answer(db_buf) is not False:
                    self.reload_remote_db(db_buf)
            else:
                self.entries[self.e_highlight].set_expire(
                    exp_date[0], exp_date[1], exp_date[2],
                    exp[3], exp[4], exp[5])
                self.changed = True
def edit_date ( self ) : exp = self . entries [ self . e_highlight ] . expire . timetuple ( ) exp_date = self . control . get_exp_date ( exp [ 0 ] , exp [ 1 ] , exp [ 2 ] ) if exp_date == - 1 : self . close ( ) elif exp_date is not False : if self . remote is True : uuid = self . entries [ self . e_highlight ] . uuid last_mod = ( self . entries [ self . e_highlight ] . last_mod . timetuple ( ) ) db_buf = self . client ( ) . set_e_exp ( str ( exp_date [ 0 ] ) . encode ( ) , str ( exp_date [ 1 ] ) . encode ( ) , str ( exp_date [ 2 ] ) . encode ( ) , uuid , last_mod ) if self . check_answer ( db_buf ) is not False : self . reload_remote_db ( db_buf ) else : self . entries [ self . e_highlight ] . set_expire ( exp_date [ 0 ] , exp_date [ 1 ] , exp_date [ 2 ] , exp [ 3 ] , exp [ 4 ] , exp [ 5 ] ) self . changed = True