Forgot to actually return the value...
This commit is contained in:
parent
023b6fda64
commit
93168b57a7
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@ import setuptools, pyshorteners
|
||||||
|
|
||||||
def shortURL(url):
|
def shortURL(url):
|
||||||
try:
|
try:
|
||||||
pyshorteners.Shortener('Google', api_key=setuptools.getSetting("Google", "googl")).short(url)
|
return pyshorteners.Shortener('Google', api_key=setuptools.getSetting("Google", "googl")).short(url)
|
||||||
except pyshorteners.exceptions.ShorteningErrorException as e:
|
except pyshorteners.exceptions.ShorteningErrorException as e:
|
||||||
print("Error handling %s" % url)
|
print("Error handling %s" % url)
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Reference in a new issue