douban / pymesos

A pure python implementation of Mesos scheduler and executor
BSD 3-Clause "New" or "Revised" License
163 stars 88 forks source link

Scheduler.error() signature declares only 2 arguments #3

Closed dangra closed 9 years ago

dangra commented 9 years ago

Scheduler.error() signature is http://mesos.apache.org/api/latest/java/org/apache/mesos/Scheduler.html#error%28org.apache.mesos.SchedulerDriver,%20java.lang.String%29

First argument is the scheduler driver and second the message, at least since mesos 0.21.1

without this fix handling a framework error fails with:

ERROR:pymesos.process:error while call <function handle at 0x23411b8> (tried 1 times)
Traceback (most recent call last):
  File "pymesos/process.py", line 69, in run_jobs
    func(*args, **kw)
  File "pymesos/process.py", line 139, in handle
    f(*args)
  File "pymesos/scheduler.py", line 127, in onFrameworkErrorMessage
    self.sched.error(self, code, message)
TypeError: error() takes exactly 3 arguments (4 given)
dangra commented 9 years ago

just noticed you released it under 0.0.6. thanks!