blob: 8731eebde27f1adb9cf3df4385c03d89256a781a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--- contrib/python/boto/py2/boto/regioninfo.py (index)
+++ contrib/python/boto/py2/boto/regioninfo.py (working tree)
@@ -115,14 +115,19 @@ def load_regions():
return endpoints
+def _load_resource_endpoints():
+ import pkgutil
+ return json.loads(pkgutil.get_data('boto', 'endpoints.json'))
+
+
def _load_builtin_endpoints(_cache=_endpoints_cache):
"""Loads the builtin endpoints in the legacy format."""
# If there's a cached response, return it
if _cache:
return _cache
- # Load the endpoints file
- endpoints = _load_json_file(boto.ENDPOINTS_PATH)
+ # Load the endpoints from resouces
+ endpoints = _load_resource_endpoints()
# Build the endpoints into the legacy format
resolver = BotoEndpointResolver(endpoints)
|