Skip to content

Commit

Permalink
fix reading of config file for xAOD Codegen special case
Browse files Browse the repository at this point in the history
  • Loading branch information
BenGalewsky committed Dec 8, 2022
1 parent 237f985 commit 4a2b0e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 25 deletions.
32 changes: 7 additions & 25 deletions code_generator_funcadl_xAOD/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os

from servicex.xaod_code_generator.ast_translator import AstAODTranslator
import servicex_codegen
Expand All @@ -35,8 +36,12 @@ def create_app(test_config=None, provided_translator=None):
# We need access to the App's config to determine translater backend before we create
# the app, so drive the flask config machinery directly
app_config = Config(".")

app_config.from_envvar("APP_CONFIG_FILE")

if 'CODEGEN_CONFIG_FILE' in os.environ:
app_config.from_envvar('CODEGEN_CONFIG_FILE')

return servicex_codegen.create_app(test_config,
provided_translator=provided_translator
if provided_translator else
Expand Down

0 comments on commit 4a2b0e0

Please sign in to comment.