diff --git a/clover/test/basic.py b/clover/test/basic.py index fe546f7d..bc3646b5 100755 --- a/clover/test/basic.py +++ b/clover/test/basic.py @@ -26,8 +26,13 @@ def test_simple_offboard_services_available(): rospy.wait_for_service('land', timeout=5) def test_web_video_server(node): - import urllib2 - urllib2.urlopen("http://localhost:8080").read() + try: + # Python 2 + import urllib2 as urllib + except ModuleNotFoundError: + # Python 3 + import urllib.request as urllib + urllib.urlopen("http://localhost:8080").read() def test_shell(node): execute = rospy.ServiceProxy('exec', srv.Execute)