Commit 17f771e0 authored by fred's avatar fred

misc: update publish to icecast command for python3

parent 298821bc
import requests
import urllib
import urllib.parse
import unicodedata
from django.core.management.base import BaseCommand, CommandError
......@@ -41,7 +41,7 @@ class Command(BaseCommand):
else:
onair_msg = onair_txt.encode('utf-8')
try:
r = requests.get(stream_url + '&song=' + urllib.quote(onair_msg), timeout=5)
r = requests.get(stream_url + '&song=' + urllib.parse.quote(onair_msg), timeout=5)
r.raise_for_status()
except Exception as e:
print('failed to update', e)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment