# Path: packages/cpenv/vendor/shotgun_api3/lib/mockgun/errors.py
# class MockgunError(Exception):
#     """
#     Base for all Mockgun related API Errors.
#     These are errors that relate to mockgun specifically, for example
#     relating to mockups setup and initialization. For operational errors,
#     mockgun raises ShotgunErrors just like the Shotgun API.
#     """


from ..six.moves import cPickle as pickle
from .errors import MockgunError
import os
"""




class SchemaFactory(object):
    """
    Allows to instantiate a pickled schema.
    """

    _schema_entity_cache = None
    _schema_entity_cache_path = None
    _schema_cache = None
    _schema_cache_path = None

    @classmethod
    def get_schemas(cls, schema_path, schema_entity_path):
        """
        Retrieves the schemas from disk.

        :param str schema_path: Path to the schema.
        :param str schema_entity_path: Path to the entities schema.

        :returns: Pair of dictionaries holding the schema and entities schema.
        :rtype: tuple
        """
        if not os.path.exists(schema_path):
            raise MockgunError("Cannot locate Mockgun schema file '%s'!" % schema_path)

        if not os.path.exists(schema_entity_path):

# Path: packages/cpenv/vendor/shotgun_api3/lib/mockgun/errors.py
# class MockgunError(Exception):
#     """
#     Base for all Mockgun related API Errors.
#     These are errors that relate to mockgun specifically, for example
#     relating to mockups setup and initialization. For operational errors,
#     mockgun raises ShotgunErrors just like the Shotgun API.
#     """


# Path: packages/cpenv/vendor/shotgun_api3/lib/mockgun/schema.py
from ..six.moves import cPickle as pickle
from .errors import MockgunError
import os

"""




class SchemaFactory(object):
    """
    Allows to instantiate a pickled schema.
    """

    _schema_entity_cache = None
    _schema_entity_cache_path = None
    _schema_cache = None
    _schema_cache_path = None

    @classmethod
    def get_schemas(cls, schema_path, schema_entity_path):
        """
        Retrieves the schemas from disk.

        :param str schema_path: Path to the schema.
        :param str schema_entity_path: Path to the entities schema.

        :returns: Pair of dictionaries holding the schema and entities schema.
        :rtype: tuple
        """
        if not os.path.exists(schema_path):
            raise MockgunError("Cannot locate Mockgun schema file '%s'!" % schema_path)

        if not os.path.exists(schema_entity_path):

            raise MockgunError("Cannot locate Mockgun schema file '%s'!" % schema_entity_path)