convert print statements to py3
This commit is contained in:
parent
2aa4392a38
commit
632ba9acfe
15 changed files with 54 additions and 40 deletions
|
@ -1,6 +1,7 @@
|
|||
""" Runs Airtime liquidsoap
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
import argparse
|
||||
import os
|
||||
import generate_liquidsoap_cfg
|
||||
|
@ -11,7 +12,7 @@ PYPO_HOME = '/var/tmp/airtime/pypo/'
|
|||
|
||||
def run():
|
||||
'''Entry-point for this application'''
|
||||
print "Airtime Liquidsoap"
|
||||
print("Airtime Liquidsoap")
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-d", "--debug", help="run in debug mode", action="store_true")
|
||||
args = parser.parse_args()
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
@ -49,7 +50,7 @@ def run():
|
|||
generate_liquidsoap_config(ss)
|
||||
successful = True
|
||||
except Exception, e:
|
||||
print "Unable to connect to the Airtime server."
|
||||
print("Unable to connect to the Airtime server.")
|
||||
logging.error(str(e))
|
||||
logging.error("traceback: %s", traceback.format_exc())
|
||||
if attempts == max_attempts:
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from __future__ import print_function
|
||||
from api_clients import *
|
||||
import sys
|
||||
|
||||
|
@ -16,8 +17,8 @@ elif dj_type == '--dj':
|
|||
response = api_clients.check_live_stream_auth(username, password, source_type)
|
||||
|
||||
if 'msg' in response and response['msg'] == True:
|
||||
print response['msg']
|
||||
print(response['msg'])
|
||||
sys.exit(0)
|
||||
else:
|
||||
print False
|
||||
print(False)
|
||||
sys.exit(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue