Compress netloc creation
Browse files
pest-management-opendata.py
CHANGED
@@ -41,14 +41,13 @@ def bucket2virtual(url):
|
|
41 |
|
42 |
@bucket2virtual.register
|
43 |
def _(url: ParseResult):
|
44 |
-
|
45 |
url.netloc,
|
46 |
url.scheme,
|
47 |
'ap-south-1',
|
48 |
'amazonaws',
|
49 |
'com',
|
50 |
-
)
|
51 |
-
netloc = '.'.join(parts)
|
52 |
|
53 |
return urlunparse(url._replace(scheme='https', netloc=netloc))
|
54 |
|
|
|
41 |
|
42 |
@bucket2virtual.register
|
43 |
def _(url: ParseResult):
|
44 |
+
netloc = '.'.join((
|
45 |
url.netloc,
|
46 |
url.scheme,
|
47 |
'ap-south-1',
|
48 |
'amazonaws',
|
49 |
'com',
|
50 |
+
))
|
|
|
51 |
|
52 |
return urlunparse(url._replace(scheme='https', netloc=netloc))
|
53 |
|