I need to make this python 3 code python 2 compatible:
class AlarmThread(threading.Thread):
def __init__(self, file_name="beep.wav"):
super().__init__()
self.file_name = file_name
self.ongoing = None
I get this error when I try to use the class in python 2:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "plugin.py", line 144, in run
alert_after_timeout(seconds, message)
File "plugin.py", line 96, in alert_after_timeout
thread = AlarmThread()
File "plugin.py", line 78, in __init__
super().__init__()
TypeError: super() takes at least 1 argument (0 given)