Skip to content

Commit 49bf814

Browse files
committed
Replace deprecated importlib.resources.path() call
1 parent 35b2770 commit 49bf814

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

conda/bootstrap.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import shutil
1212
import progressbar
1313
from jinja2 import Template
14-
from importlib.resources import path
14+
import importlib.resources
1515
from configparser import ConfigParser
1616

1717
from mache import discover_machine, MachineInfo
@@ -30,8 +30,9 @@ def get_config(config_file, machine):
3030

3131
if machine is not None:
3232
if not machine.startswith('conda'):
33-
with path('mache.machines', f'{machine}.cfg') as machine_config:
34-
config.read(str(machine_config))
33+
machine_config = \
34+
importlib.resources('mache.machines') / f'{machine}.cfg'
35+
config.read(str(machine_config))
3536

3637
machine_config = os.path.join(here, '..', 'compass', 'machines',
3738
'{}.cfg'.format(machine))

0 commit comments

Comments
 (0)