From ef64d0fb3920210eb192db4f768c6c61434897f2 Mon Sep 17 00:00:00 2001 From: Jonas Eschle 'Mayou36 <jonas.eschle@cern.ch> Date: Thu, 18 Jan 2018 15:39:04 +0100 Subject: [PATCH] Fix yaml loading from file --- analysis/fit/result.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/analysis/fit/result.py b/analysis/fit/result.py index 4c5f127..af538c7 100644 --- a/analysis/fit/result.py +++ b/analysis/fit/result.py @@ -153,12 +153,13 @@ class FitResult(object): """ try: - return FitResult(dict(load_config(_paths.get_fit_result_path(name), - validate=('fit-parameters', - 'fit-parameters-initial', - 'covariance-matrix/quality', - 'covariance-matrix/matrix', - 'status')))) + yaml_config = load_config(_paths.get_fit_result_path(name), + validate=('fit-parameters', + 'fit-parameters-initial', + 'covariance-matrix/quality', + 'covariance-matrix/matrix', + 'status')) + return FitResult.from_yaml(yaml_config) except ConfigError as error: raise KeyError("Missing keys in input file -> {}".format(','.join(error.missing_keys))) -- GitLab