def set_total_duration(self, duration):
        """ Set the total task duration in minutes.
            """
        if duration < 1:
            raise ValueError(u'Duration must be postive')

        elif self.duration > duration:
            raise ValueError(u'{0} must be greater than current duration')

        self._total_duration = duration
def set_total_duration ( self , duration ) : if duration < 1 : raise ValueError ( u'Duration must be postive' ) elif self . duration > duration : raise ValueError ( u'{0} must be greater than current duration' ) self . _total_duration = duration
Set the total task duration in minutes.