From bb0afef84d2de322563c79b3fb2bcc489a668eb1 Mon Sep 17 00:00:00 2001 From: Corwin Perren Date: Fri, 27 Jul 2018 14:32:39 -0700 Subject: [PATCH] Fixed git reset scripts --- ground_station_git_reset.sh | 4 ++-- .../ground_station/src/Framework/MapSystems/RoverMap.py | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ground_station_git_reset.sh b/ground_station_git_reset.sh index b380aed..1d03fa5 100755 --- a/ground_station_git_reset.sh +++ b/ground_station_git_reset.sh @@ -1,6 +1,6 @@ #!/bin/bash -cp -r software/ros_packages/ground_station/src/Maps ~/Maps_Backup +cp -r software/ros_packages/ground_station/src/Resources/Maps ~/Maps_Backup git reset --hard git clean -fdx git pull -cp -r ~/Maps_Backup software/ros_packages/ground_station/src/Maps +cp -r ~/Maps_Backup software/ros_packages/ground_station/src/Resources/Maps diff --git a/software/ros_packages/ground_station/src/Framework/MapSystems/RoverMap.py b/software/ros_packages/ground_station/src/Framework/MapSystems/RoverMap.py index 89f9736..3f77309 100644 --- a/software/ros_packages/ground_station/src/Framework/MapSystems/RoverMap.py +++ b/software/ros_packages/ground_station/src/Framework/MapSystems/RoverMap.py @@ -139,7 +139,13 @@ class GMapsStitcher(object): # make the url url = urlbase % specs url = signing.sign_url(url, _KEYS[1]) - result = urllib2.urlopen(urllib2.Request(url)).read() + try: + result = urllib2.urlopen(urllib2.Request(url)).read() + except urllib2.HTTPError, e: + print "Error accessing url for reason:", e + print url + return + tile_object = PIL.Image.open(BytesIO(result)) if not os.path.exists('Resources/Maps'): os.mkdir('Resources/Maps')