File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1- import importlib .util
21import os
32
43try :
1211USER_DATA_PATH = None
1312LOCAL_DOWNLOADED_EXAMPLES_PATH = None
1413try :
15- spec = importlib .util .find_spec (name = __name__ )
16- USER_DATA_PATH = os .path .dirname (spec .origin )
14+ import pkgutil
15+
16+ spec = pkgutil .get_loader (__name__ )
17+ USER_DATA_PATH = os .path .dirname (spec .get_filename (__name__ ))
1718 if not os .path .exists (USER_DATA_PATH ): # pragma: no cover
1819 os .makedirs (USER_DATA_PATH )
1920
2021 LOCAL_DOWNLOADED_EXAMPLES_PATH = os .path .join (USER_DATA_PATH , "examples" )
2122 if not os .path .exists (LOCAL_DOWNLOADED_EXAMPLES_PATH ): # pragma: no cover
2223 os .makedirs (LOCAL_DOWNLOADED_EXAMPLES_PATH )
23- except Exception as e : # pragma: no cover
24- raise e
24+ except : # pragma: no cover
25+ pass
2526
2627installed = [d .metadata ["Name" ] for d in importlib_metadata .distributions ()]
2728check_for = ["ansys-dpf-gatebin" , "ansys-dpf-gate" , "ansys-grpc-dpf" ]
You can’t perform that action at this time.
0 commit comments