From 6efba799a83a5c9493791a322a794264d8813bab Mon Sep 17 00:00:00 2001 From: Rustam Gubaydullin Date: Sun, 3 Dec 2023 06:52:03 +0300 Subject: [PATCH] Use os.path.normpath before open call --- src/shortcircuit/model/evedb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shortcircuit/model/evedb.py b/src/shortcircuit/model/evedb.py index 814971a..f185d93 100644 --- a/src/shortcircuit/model/evedb.py +++ b/src/shortcircuit/model/evedb.py @@ -12,9 +12,10 @@ def get_dict_from_csv(filename: str): bundle_dir = path.abspath(path.dirname(__file__)) filepath = path.join(bundle_dir, '..', '..', 'database', filename) - Logger.info(filepath) + normpath = path.normpath(filepath) + Logger.info(normpath) - f = open(filepath, 'r', encoding='utf-8') + f = open(normpath, 'r', encoding='utf-8') reader = csv.reader(f, delimiter=';') return reader