1
0
Fork 0

urlreducer: define DEFAULT_PROVIDER later

This commit is contained in:
nemunaire 2019-02-01 17:45:08 +01:00
parent 517bf21d25
commit 9417e2ba93
1 changed files with 3 additions and 1 deletions

View File

@ -60,12 +60,14 @@ def load(context):
# MODULE CORE #########################################################
def reduce(url, provider=DEFAULT_PROVIDER):
def reduce(url, provider=None):
"""Ask the url shortner website to reduce given URL
Argument:
url -- the URL to reduce
"""
if provider is None:
provider = DEFAULT_PROVIDER
return PROVIDERS[provider][0](PROVIDERS[provider][1], url)