Skip to content

Commit d0d5a13

Browse files
mshaileshr@gmail.commshaileshr@gmail.com
authored andcommitted
docstring
1 parent 53a31a6 commit d0d5a13

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

contentstack/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ def region(self, region=ContentstackRegion.US):
6666
"""
6767

6868
if region is not None and isinstance(region, ContentstackRegion):
69+
if region != ContentstackRegion.US:
70+
if self.default["host"] == 'cdn.contentstack.io':
71+
self.default["host"] = 'cdn.contentstack.com'
6972
self.default['region'] = region
7073

7174
@property
@@ -156,4 +159,4 @@ def __get_url(self):
156159
if self.default["host"] == 'cdn.contentstack.io':
157160
self.default["host"] = 'cdn.contentstack.com'
158161
host = '{}-{}'.format(region, self.default["host"])
159-
return "{0}://{1}/{2}".format(self.default["protocol"], host, self.default["version"])
162+
return "{0}://{1}/{2}".format(self.default["protocol"], host, self.default["version"])

0 commit comments

Comments
 (0)