install successfully using py3

This commit is contained in:
Kyle Robbertze 2020-01-16 16:32:51 +02:00
parent cf2dda4532
commit 8346e89e99
41 changed files with 259 additions and 287 deletions

View file

@ -1,10 +1,10 @@
""" Runs Airtime liquidsoap
"""
from __future__ import print_function
import argparse
import os
import generate_liquidsoap_cfg
from . import generate_liquidsoap_cfg
import logging
import subprocess

View file

@ -1,4 +1,4 @@
from __future__ import print_function
import logging
import os
import sys
@ -14,7 +14,7 @@ def generate_liquidsoap_config(ss):
fh.write("################################################\n")
fh.write("# The ignore() lines are to squash unused variable warnings\n")
for key, value in data.iteritems():
for key, value in data.items():
try:
if not "port" in key and not "bitrate" in key: # Stupid hack
raise ValueError()
@ -49,7 +49,7 @@ def run():
ss = ac.get_stream_setting()
generate_liquidsoap_config(ss)
successful = True
except Exception, e:
except Exception as e:
print("Unable to connect to the Airtime server.")
logging.error(str(e))
logging.error("traceback: %s", traceback.format_exc())

View file

@ -1,4 +1,4 @@
from __future__ import print_function
from api_clients import *
import sys

View file

@ -13,7 +13,7 @@ try:
tn.write('exit\n')
tn.read_all()
except Exception, e:
print('Error loading config file: %s', e)
except Exception as e:
print(('Error loading config file: %s', e))
sys.exit()