From 0b3fea2c3c3804e2ac63e646894bb78cd0655bc4 Mon Sep 17 00:00:00 2001 From: Nick Papior Date: Thu, 16 Nov 2023 22:05:42 +0100 Subject: [PATCH] fixed bug in sisl.io warning Signed-off-by: Nick Papior --- src/sisl/io/sile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sisl/io/sile.py b/src/sisl/io/sile.py index fb06166f97..3bd81b5186 100644 --- a/src/sisl/io/sile.py +++ b/src/sisl/io/sile.py @@ -14,7 +14,7 @@ from sisl._environ import get_environ_variable from sisl._internal import set_module -from sisl.messages import SislInfo, SislWarning, deprecate, info +from sisl.messages import SislInfo, SislWarning, deprecate, info, warn from sisl.utils.misc import str_spec from ._help import * @@ -500,7 +500,7 @@ def base_directory(self, relative_to="."): relative_to = Path(relative_to) try: d = self._directory.relative_to(relative_to.resolve()) - except ValueError: # in case they are not relative + except ValueError: # in case they are not relative d = self._directory return d