aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Wichser <blast007@users.sourceforge.net>2019-01-25 02:37:57 +0000
committerScott Wichser <blast007@users.sourceforge.net>2019-01-25 02:37:57 +0000
commit89f9b855195cb2b2c6fdca3dd3c9a00f63afda94 (patch)
treed392cd3d2dfe4118c4d4f48e12b5f0e29251a5fa
parentf2de89d8a638da27d9efe49c473536046c48c3bd (diff)
downloadsupybot_github-89f9b855195cb2b2c6fdca3dd3c9a00f63afda94.tar.gz
supybot_github-89f9b855195cb2b2c6fdca3dd3c9a00f63afda94.tar.bz2
supybot_github-89f9b855195cb2b2c6fdca3dd3c9a00f63afda94.zip
Fix a couple other errors.
-rw-r--r--local/utility.py4
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,))

© 2014-2024 Faster IT GmbH | imprint | privacy policy