diff options
author | Scott Wichser <blast007@users.sourceforge.net> | 2019-01-25 02:37:57 +0000 |
---|---|---|
committer | Scott Wichser <blast007@users.sourceforge.net> | 2019-01-25 02:37:57 +0000 |
commit | 89f9b855195cb2b2c6fdca3dd3c9a00f63afda94 (patch) | |
tree | d392cd3d2dfe4118c4d4f48e12b5f0e29251a5fa | |
parent | f2de89d8a638da27d9efe49c473536046c48c3bd (diff) | |
download | supybot_github-89f9b855195cb2b2c6fdca3dd3c9a00f63afda94.tar.gz supybot_github-89f9b855195cb2b2c6fdca3dd3c9a00f63afda94.tar.bz2 supybot_github-89f9b855195cb2b2c6fdca3dd3c9a00f63afda94.zip |
Fix a couple other errors.
-rw-r--r-- | local/utility.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/local/utility.py b/local/utility.py index 01159a5..40addd4 100644 --- a/local/utility.py +++ b/local/utility.py @@ -138,9 +138,9 @@ def getShortURL(longurl): # Temporarily disabled url = longurl try: - req = urllib.request.Request("https://git.io/", data) + req = urllib.request.Request("https://git.io/", data.encode()) response = urllib.request.urlopen(req) - url = response.info().getheader('Location') + url = response.getheader('Location') except IOError as e: # Bad luck log.warning("URL shortening failed with: %s" % (e.message,)) |