From 89f9b855195cb2b2c6fdca3dd3c9a00f63afda94 Mon Sep 17 00:00:00 2001 From: Scott Wichser Date: Fri, 25 Jan 2019 02:37:57 +0000 Subject: Fix a couple other errors. --- local/utility.py | 4 ++-- 1 file 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,)) -- cgit v1.2.3