# Path: yledl/backends.py
# class FailingBackend(BaseDownloader):
#     def __init__(self, error_message):
#         BaseDownloader.__init__(self)
#         self.error_message = error_message
#         self.name = None
# 
#     def is_valid(self):
#         return False
# 
#     def save_stream(self, output_name, clip, io):
#         logger.error(self.error_message)
#         return RD_FAILED
# 
#     def pipe(self, io):
#         logger.error(self.error_message)
#         return RD_FAILED


import attr
from .backends import FailingBackend


@attr.s
class StreamFlavor:
    media_type = attr.ib()
    height = attr.ib(default=None, converter=attr.converters.optional(int))

# Path: yledl/backends.py
# class FailingBackend(BaseDownloader):
#     def __init__(self, error_message):
#         BaseDownloader.__init__(self)
#         self.error_message = error_message
#         self.name = None
# 
#     def is_valid(self):
#         return False
# 
#     def save_stream(self, output_name, clip, io):
#         logger.error(self.error_message)
#         return RD_FAILED
# 
#     def pipe(self, io):
#         logger.error(self.error_message)
#         return RD_FAILED


# Path: yledl/streamflavor.py
import attr
from .backends import FailingBackend



@attr.s
class StreamFlavor:
    media_type = attr.ib()
    height = attr.ib(default=None, converter=attr.converters.optional(int))

    width = attr.ib(default=None, converter=attr.converters.optional(int))