Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

callback called wrong? #1

Open
molecular opened this issue May 10, 2016 · 0 comments · May be fixed by #2
Open

callback called wrong? #1

molecular opened this issue May 10, 2016 · 0 comments · May be fixed by #2

Comments

@molecular
Copy link

molecular commented May 10, 2016

nick@dose  (master) ~/py-fritz-monitor\> python3 example.py
Success connecting to fritz.box on port: 1012
Listening for calls
Traceback (most recent call last):
  File "example.py", line 27, in <module>
    call.parse("09.03.14 21:51:56;CALL;0;12;453423;04829401845;SIP0;") #Simulates outgoing call
  File "/home/nick/py-fritz-monitor/call_monitor.py", line 76, in parse
    self.call_callback(int(line[2]), "outgoing", self.call_handler[int(line[2])])
  File "/home/nick/py-fritz-monitor/call_monitor.py", line 35, in call_callback
    self.callback(id, action, details)
TypeError: my_cb() missing 1 required positional argument: 'details'

fixed by changing call_monitor.py:20 to

self.callback(self, id, action, details)

(adding the "self")

@DavidMStraub DavidMStraub linked a pull request Jul 8, 2016 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant