Fixed git reset scripts

This commit is contained in:
2018-07-27 14:32:39 -07:00
parent 2613d327ec
commit bb0afef84d
2 changed files with 9 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/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 reset --hard
git clean -fdx git clean -fdx
git pull 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

View File

@@ -139,7 +139,13 @@ class GMapsStitcher(object):
# make the url # make the url
url = urlbase % specs url = urlbase % specs
url = signing.sign_url(url, _KEYS[1]) 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)) tile_object = PIL.Image.open(BytesIO(result))
if not os.path.exists('Resources/Maps'): if not os.path.exists('Resources/Maps'):
os.mkdir('Resources/Maps') os.mkdir('Resources/Maps')