From 973c1b34b7e3234fdbaadfe26102201e8e5f8be3 Mon Sep 17 00:00:00 2001 From: Brian Cheung Date: Thu, 24 Mar 2022 11:52:54 -0400 Subject: [PATCH] Simplified parsing as path --- jacquard/api.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jacquard/api.py b/jacquard/api.py index 3ea0f21..5643a16 100644 --- a/jacquard/api.py +++ b/jacquard/api.py @@ -129,10 +129,7 @@ def as_path(self, parent=None, check_exist=False): JacquardTypeError: If the value cannot be resolved to Path """ fp = Path(self.as_str()) if parent is None else (Path(parent) / Path(self.as_str())) - if check_exist: - if not fp.exists(): - raise FileNotFoundError('File `%s` not found' % fp.as_posix()) - return fp + return fp.resolve(strict=check_exist) def as_set(self, sub_type=None): """Converts the value to a set.