bug 7368 : os.environ['http_proxy'] gives an error if http_proxy is not set.
This commit is contained in:
parent
32d2ef4b5e
commit
d0cf197430
@ -133,16 +133,16 @@ class OsmGps():
|
||||
constants.map_title[map_type])
|
||||
config.set("geography.map_service", map_type)
|
||||
self.current_map = map_type
|
||||
http_proxy = os.environ['http_proxy']
|
||||
http_proxy = os.environ.get('http_proxy')
|
||||
if 0:
|
||||
self.osm = DummyMapNoGpsPoint()
|
||||
else:
|
||||
if http_proxy == "":
|
||||
if http_proxy:
|
||||
self.osm = osmgpsmap.Map(tile_cache=tiles_path,
|
||||
proxy_uri=http_proxy,
|
||||
map_source=constants.map_type[map_type])
|
||||
else:
|
||||
self.osm = osmgpsmap.Map(tile_cache=tiles_path,
|
||||
proxy_uri=http_proxy,
|
||||
map_source=constants.map_type[map_type])
|
||||
self.osm.props.tile_cache = osmgpsmap.MAP_CACHE_AUTO
|
||||
current_map = osmgpsmap.MapOsd( show_dpad=False, show_zoom=True)
|
||||
|
Loading…
Reference in New Issue
Block a user