[ 
https://issues.apache.org/jira/browse/MESOS-78?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13163245#comment-13163245
 ] 

[email protected] commented on MESOS-78:
----------------------------------------------------



bq.  On 2011-11-21 23:03:35, Andy Konwinski wrote:
bq.  > I'm about to commit this. Thanks Charles!

We should revert this commit and instead apply the following:


diff --git a/src/python/native/mesos_executor_driver_impl.cpp 
b/src/python/native/mesos_executor_driver_impl.cpp
index ed4aaa5..9e10873 100644
--- a/src/python/native/mesos_executor_driver_impl.cpp
+++ b/src/python/native/mesos_executor_driver_impl.cpp
@@ -231,9 +231,9 @@ PyObject* 
MesosExecutorDriverImpl_stop(MesosExecutorDriverImpl* self,
     return NULL;
   }
 
-  bool failover = false;
+  bool failover = false; // Should match default in mesos.py.
 
-  if (!PyArg_ParseTuple(args, "b", &failover)) {
+  if (!PyArg_ParseTuple(args, "|b", &failover)) {
     return NULL;
   }
 

diff --git a/src/python/native/mesos_scheduler_driver_impl.cpp 
b/src/python/native/mesos_scheduler_driver_impl.cpp
index 4bde768..683ad04 100644
--- a/src/python/native/mesos_scheduler_driver_impl.cpp
+++ b/src/python/native/mesos_scheduler_driver_impl.cpp
@@ -275,7 +275,7 @@ PyObject* 
MesosSchedulerDriverImpl_stop(MesosSchedulerDriverImpl* self,
 
   bool failover = false;
 
-  if (!PyArg_ParseTuple(args, "b", &failover)) {
+  if (!PyArg_ParseTuple(args, "|b", &failover)) {
     return NULL;
   }
 


- Benjamin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2815/#review3410
-----------------------------------------------------------


On 2011-11-12 08:28:53, Charles Reiss wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2815/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-11-12 08:28:53)
bq.  
bq.  
bq.  Review request for mesos.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Fixes MESOS-78.
bq.  
bq.  
bq.  This addresses bug MESOS-78.
bq.      https://issues.apache.org/jira/browse/MESOS-78
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    src/examples/python/test_framework.py 0e4b14c 
bq.  
bq.  Diff: https://reviews.apache.org/r/2815/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Checked output of tests/external/SampleFrameworks/PythonFramework.sh
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Charles
bq.  
bq.


                
> Example Python framework crashes on exit
> ----------------------------------------
>
>                 Key: MESOS-78
>                 URL: https://issues.apache.org/jira/browse/MESOS-78
>             Project: Mesos
>          Issue Type: Bug
>          Components: python-api
>            Reporter: Charles Reiss
>            Assignee: Charles Reiss
>            Priority: Minor
>
> The Python example framework produces a message like
> Failed to call scheduler's statusUpdate
> Traceback (most recent call last):
>   File 
> "/scratch/charles/mesos2/build-linux/bin/examples/python/test_framework.py", 
> line 74, in statusUpdate
>     driver.stop()
> TypeError: function takes exactly 1 argument (0 given)
> before exiting. Due to a different bug, this doesn't cause the 
> PythonFramework external test to fail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to