From 9308d4d7108705a70515820e49a2e9fdb90e94ea Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Wed, 22 May 2024 11:51:49 +0200 Subject: [PATCH] file path was not properly displayed --- compliance_checker/cf/cf_1_6.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compliance_checker/cf/cf_1_6.py b/compliance_checker/cf/cf_1_6.py index 4b45b3e9..d7fa6906 100644 --- a/compliance_checker/cf/cf_1_6.py +++ b/compliance_checker/cf/cf_1_6.py @@ -59,10 +59,11 @@ def __init__(self, options=None): # initialize with parent methods and data def check_filename(self, ds): """Checks that the filename ends with .nc""" # IMPLEMENTS CONFORMANCE 2.1 + filepath = ds.filepath() filename_suffix = TestCtx(BaseCheck.HIGH, self.section_titles["2.1"]) filename_suffix.assert_true( - ds.filepath().endswith("nc"), - f'Dataset path {ds.filepath} must end with ".nc"', + filepath.endswith("nc"), + f'Dataset path {filepath} must end with ".nc"', ) return filename_suffix.to_result()