mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 21:19:35 +00:00
clover: Fix importing urllib for Python3
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user