File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
src/rai_core/rai/tools/ros2/generic Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- try :
16
- pass
17
- except ImportError :
15
+ import importlib . util
16
+
17
+ if importlib . util . find_spec ( "rclpy" ) is None :
18
18
raise ImportError (
19
19
"This is a ROS2 feature. Make sure ROS2 is installed and sourced."
20
20
)
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- try :
16
- pass
17
- except ImportError :
15
+ import importlib . util
16
+
17
+ if importlib . util . find_spec ( "rclpy" ) is None :
18
18
raise ImportError (
19
19
"This is a ROS2 feature. Make sure ROS2 is installed and sourced."
20
20
)
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- try :
16
- pass
17
- except ImportError :
15
+ import importlib . util
16
+
17
+ if importlib . util . find_spec ( "rclpy" ) is None :
18
18
raise ImportError (
19
19
"This is a ROS2 feature. Make sure ROS2 is installed and sourced."
20
20
)
You can’t perform that action at this time.
0 commit comments