<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def linkify(self, timeperiods):
 """ Will make timeperiod in exclude with id of the timeperiods :param timeperiods: Timeperiods object :type timeperiods: :return: None """

        new_exclude = []
        if hasattr(self, 'exclude') and self.exclude != []:
            logger.debug("[timeentry::%s] have excluded %s", self.get_name(), self.exclude)
            excluded_tps = self.exclude
            for tp_name in excluded_tps:
                timepriod = timeperiods.find_by_name(tp_name.strip())
                if timepriod is not None:
                    new_exclude.append(timepriod.uuid)
                else:
                    msg = "[timeentry::%s] unknown %s timeperiod" % (self.get_name(), tp_name)
                    self.add_error(msg)
        self.exclude = new_exclude