From e11b7e6289fdd3e1e8e492bd393be0784809c6c0 Mon Sep 17 00:00:00 2001 From: marceloprates Date: Tue, 8 Nov 2022 13:59:28 -0300 Subject: [PATCH] Fixed presets directory path-related error with preset() function --- prettymaps/draw.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/prettymaps/draw.py b/prettymaps/draw.py index b4d551c..090cfd3 100644 --- a/prettymaps/draw.py +++ b/prettymaps/draw.py @@ -772,11 +772,7 @@ def presets(): def preset(name): - base_path = os.path.abspath(os.path.join( - os.path.dirname(prettymaps.__file__), - os.path.pardir - )) - with open(os.path.join(base_path, "presets", f"{name}.json"), "r") as f: + with open(os.path.join(presets_directory(), f"{name}.json"), "r") as f: # Load params from JSON file params = json.load(f) return Preset(params)