Format code using black

This commit is contained in:
jo 2021-05-27 16:23:02 +02:00
parent efe4fa027e
commit c27f020d73
85 changed files with 3238 additions and 2243 deletions

View file

@ -9,14 +9,18 @@ if os.geteuid() != 0:
print("Please run this as root.")
sys.exit(1)
def get_current_script_dir():
current_script_dir = os.path.realpath(__file__)
index = current_script_dir.rindex('/')
return current_script_dir[0:index]
current_script_dir = os.path.realpath(__file__)
index = current_script_dir.rindex("/")
return current_script_dir[0:index]
try:
current_script_dir = get_current_script_dir()
shutil.copy(current_script_dir+"/../airtime-icecast-status.xsl", "/usr/share/icecast2/web")
shutil.copy(
current_script_dir + "/../airtime-icecast-status.xsl", "/usr/share/icecast2/web"
)
except Exception as e:
print("exception: {}".format(e))