10 lines
366 B
Python
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") |