1
0

start using util.resource_path

This commit is contained in:
SomberNight
2019-02-04 18:56:51 +01:00
parent 67d080b34a
commit 5a1778b7fe
2 changed files with 5 additions and 5 deletions

View File

@@ -14,8 +14,8 @@ from typing import Sequence
from .bitcoin import COIN
from .i18n import _
from .util import PrintError, ThreadJob, make_dir, log_exceptions
from .util import make_aiohttp_session
from .util import (PrintError, ThreadJob, make_dir, log_exceptions,
make_aiohttp_session, resource_path)
from .network import Network
from .simple_config import SimpleConfig
@@ -394,7 +394,7 @@ def dictinvert(d):
return inv
def get_exchanges_and_currencies():
path = os.path.join(os.path.dirname(__file__), 'currencies.json')
path = resource_path('currencies.json')
try:
with open(path, 'r', encoding='utf-8') as f:
return json.loads(f.read())