How to use the mirage.system.warn function in mirage

To help you get started, we’ve selected a few mirage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shotastage / mirage-django-lts / mini / config.py View on Github external
def load_additional_conf():
    sys.warn("mirage.config.load_additional_conf will be deprecated on next version.", PendingDeprecationWarning)
    with open("Miragefile.addon", "r") as djfile:
        try:
            return yaml.load(djfile)
        except:
            raise Exception
github shotastage / mirage-django-lts / mirage / config.py View on Github external
def load_miragefile():
    sys.warn("mirage.config.load_miragefile will be deprecated on next version.", PendingDeprecationWarning)
    with open("Miragefile", "r") as djfile:
        try:
            return json.load(djfile)
        except:
            raise Exception
github shotastage / mirage-django-lts / mini / config.py View on Github external
def get_all_config():
    sys.warn("mirage.config.get_all_config will be deprecated on next version.", PendingDeprecationWarning)
    return load_miragefile()
github shotastage / mirage-django-lts / mirage / config.py View on Github external
def get_proj_config(conf_name):
    sys.warn("mirage.config.get_proj_config will be deprecated on next version.", PendingDeprecationWarning)
    try:
        data = load_miragefile()

        if os.path.exists("Miragefile.addon"): additional = load_additional_conf()
        elif os.path.exists("Miragefile.secret"):   secret = load_secret_conf()
    except:
        return "Invalid Miragefile"

    if conf_name == "all":
        return data

    elif conf_name == "name":
        return data["project"]["name"]

    elif conf_name == "version":
        return data["project"]["version"]
github shotastage / mirage-django-lts / mini / config.py View on Github external
def load_miragefile():
    sys.warn("mirage.config.load_miragefile will be deprecated on next version.", PendingDeprecationWarning)
    with open("Miragefile", "r") as djfile:
        try:
            return yaml.load(djfile)
        except:
            raise Exception
github shotastage / mirage-django-lts / mini / config.py View on Github external
def get_django_config(conf_name):
    sys.warn("mirage.config.get_django_config will be deprecated on next version.", PendingDeprecationWarning)
    try:
        data = load_miragefile()
    except:
        return "Invalid Miragefile"

    if conf_name == "path":
        if data["django"]["path"] == ".": return os.getcwd()
        else: return data["django"]["path"]

    elif conf_name == "package":
        return data["django"]["package"]

    elif conf_name == "database":
        return data["django"]["database"]
github shotastage / mirage-django-lts / mirage / config.py View on Github external
def get_django_config(conf_name):
    sys.warn("mirage.config.get_django_config will be deprecated on next version.", PendingDeprecationWarning)
    try:
        data = load_miragefile()
    except:
        return "Invalid Miragefile"

    if conf_name == "path":
        if data["django"]["path"] == ".": return os.getcwd()
        else: return data["django"]["path"]

    elif conf_name == "package":
        return data["django"]["package"]

    elif conf_name == "database":
        return data["django"]["database"]
github shotastage / mirage-django-lts / mini / config.py View on Github external
def load_secret_conf():
    sys.warn("mirage.config.load_secret_conf will be deprecated on next version.", PendingDeprecationWarning)
    with open("Miragefile.secret", "r") as djfile:
        try:
            return yaml.load(djfile)
        except:
            raise Exception