# Path: operators/pysrt/srtexc.py
# class InvalidTimeString(Error):
#     """
#     Raised when parser fail on bad formated time strings
#     """
#     pass


import re
from datetime import time
from .srtexc import InvalidTimeString
from .comparablemixin import ComparableMixin
from .compat import str, basestring
        yield self.hours
        yield self.minutes
        yield self.seconds
        yield self.milliseconds

    def shift(self, *args, **kwargs):
        """
        shift(hours, minutes, seconds, milliseconds)

        All arguments are optional and have a default value of 0.
        """
        if 'ratio' in kwargs:
            self *= kwargs.pop('ratio')
        self += self.__class__(*args, **kwargs)

    @classmethod
    def from_ordinal(cls, ordinal):
        """
        int -> SubRipTime corresponding to a total count of milliseconds
        """
        return cls(milliseconds=int(ordinal))

    @classmethod
    def from_string(cls, source):
        """
        str/unicode(HH:MM:SS,mmm) -> SubRipTime corresponding to serial
        raise InvalidTimeString
        """
        items = cls.RE_TIME_SEP.split(source)
        if len(items) != 4:

# Path: operators/pysrt/srtexc.py
# class InvalidTimeString(Error):
#     """
#     Raised when parser fail on bad formated time strings
#     """
#     pass


# Path: operators/pysrt/srttime.py
import re
from datetime import time
from .srtexc import InvalidTimeString
from .comparablemixin import ComparableMixin
from .compat import str, basestring

        yield self.hours
        yield self.minutes
        yield self.seconds
        yield self.milliseconds

    def shift(self, *args, **kwargs):
        """
        shift(hours, minutes, seconds, milliseconds)

        All arguments are optional and have a default value of 0.
        """
        if 'ratio' in kwargs:
            self *= kwargs.pop('ratio')
        self += self.__class__(*args, **kwargs)

    @classmethod
    def from_ordinal(cls, ordinal):
        """
        int -> SubRipTime corresponding to a total count of milliseconds
        """
        return cls(milliseconds=int(ordinal))

    @classmethod
    def from_string(cls, source):
        """
        str/unicode(HH:MM:SS,mmm) -> SubRipTime corresponding to serial
        raise InvalidTimeString
        """
        items = cls.RE_TIME_SEP.split(source)
        if len(items) != 4:

            raise InvalidTimeString