Commit 51702e4 1 parent 62b9969 commit 51702e4 Copy full SHA for 51702e4
File tree 1 file changed +4
-6
lines changed
schunk_gripper_dummy/schunk_gripper_dummy
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
from threading import Thread
2
2
import time
3
- import pkg_resources # type: ignore [ import-untyped]
3
+ from importlib . resources import files
4
4
import json
5
5
import struct
6
6
from typing import Tuple
@@ -56,11 +56,9 @@ def __init__(self):
56
56
self .reserved_status_bits = [10 , 15 ] + list (range (18 , 31 ))
57
57
self .reserved_control_bits = [10 , 15 ] + list (range (17 , 30 ))
58
58
59
- enum_config = pkg_resources .resource_filename (__name__ , "config/enum.json" )
60
- metadata_config = pkg_resources .resource_filename (
61
- __name__ , "config/metadata.json"
62
- )
63
- data_config = pkg_resources .resource_filename (__name__ , "config/data.json" )
59
+ enum_config = files (__package__ ).joinpath ("config/enum.json" )
60
+ metadata_config = files (__package__ ).joinpath ("config/metadata.json" )
61
+ data_config = files (__package__ ).joinpath ("config/data.json" )
64
62
65
63
with open (enum_config , "r" ) as f :
66
64
self .enum = json .load (f )
You can’t perform that action at this time.
0 commit comments