From 368e4683d67c76c3ecff70f5fd098406d9eb641e Mon Sep 17 00:00:00 2001 From: pictuga Date: Thu, 16 Dec 2021 08:53:18 +0000 Subject: [PATCH] util: clean paths code --- morss/util.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/morss/util.py b/morss/util.py index cb4dd76..276e2cf 100644 --- a/morss/util.py +++ b/morss/util.py @@ -34,17 +34,17 @@ def data_path(path=''): bases = [ os.path.join(sys.prefix, 'share/morss/www'), - os.path.join(pkg_path(), '../../../share/morss/www'), - os.path.join(pkg_path(), '../../../../share/morss/www'), - os.path.join(pkg_path(), '../www'), - os.path.join(pkg_path(), '../..') + pkg_path('../../../share/morss/www'), + pkg_path('../../../../share/morss/www'), + pkg_path('../www'), + pkg_path('../..') ] for base in bases: full_path = os.path.join(base, path) if os.path.isfile(full_path): - data_path_base = base + data_path_base = os.path.abspath(base) return data_path(path) else: