Files
x11ma/script/test/test_sound.py
2025-12-17 09:49:26 +01:00

10 lines
366 B
Python

import traceback
def play_sound(name):
try:
Audio.playFile(File(Setup.expandPath("{home}/sounds/" + name + ".wav")), False)
except:
#TODO: sound does not work when logged as e-account
if not Sys.getUserName().startswith("e"):
log("Error playing sound " + name + ": " + str(sys.exc_info()[1]), False)
play_sound("success")