From 921c2764228f8da43cf60dc4b907065b4534979b Mon Sep 17 00:00:00 2001 From: Marcus Ottosson Date: Wed, 2 Aug 2017 14:53:04 +0100 Subject: [PATCH] Adhere to schema --- launcher/__main__.py | 9 +++++++++ launcher/control.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/launcher/__main__.py b/launcher/__main__.py index 7fd0e55..9b86b48 100644 --- a/launcher/__main__.py +++ b/launcher/__main__.py @@ -56,6 +56,15 @@ def cli(): [os.getenv(dependency) for dependency in dependencies] ) + # Fulfill schema, and expect the application + # to fill it in in due course. + for placeholder in ("AVALON_PROJECT", + "AVALON_ASSET", + "AVALON_SILO", + "AVALON_TASK", + "AVALON_APP",): + os.environ[placeholder] = "placeholder" + # Expose dependencies to Launcher sys.path[:] = [ os.getenv(dep) for dep in dependencies diff --git a/launcher/control.py b/launcher/control.py index 80c1c6e..4ed3a58 100644 --- a/launcher/control.py +++ b/launcher/control.py @@ -130,13 +130,13 @@ def launch(self, name): frame = self.current_frame() frame["environment"]["root"] = self._root + frame["environment"]["app"] = app["application_dir"] template_private = frame["config"]["template"]["work"] try: workdir = template_private.format(**dict( user=getpass.getuser(), - app=app["application_dir"], **frame["environment"] ))