Skip to content

Commit 9dc948f

Browse files
committed
Merge pull request #6 from mandad/master
Fixed warning on compile and error message in callbackcomms example
2 parents 1c02aaf + e42e278 commit 9dc948f

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

Documentation/examples/callbackcomms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def c():
1313

1414
def m():
1515
map(lambda msg: msg.trace(), comms.fetch() )
16+
return True
1617

1718
def main():
1819

pyMOOS.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,17 @@ class AsyncCommsWrapper : public MOOS::MOOSAsyncCommClient {
8585
}
8686

8787
bool Close(bool nice){
88+
bool bResult = false;
89+
8890
Py_BEGIN_ALLOW_THREADS
8991
//PyGILState_STATE gstate = PyGILState_Ensure();
9092
closing_ = true;
91-
BASE::Close(true);
93+
bResult = BASE::Close(true);
9294

9395
//PyGILState_Release(gstate);
9496
Py_END_ALLOW_THREADS
97+
98+
return bResult;
9599
}
96100

97101

@@ -397,5 +401,4 @@ BOOST_PYTHON_MODULE(pymoos)
397401

398402
bp::register_exception_translator<pyMOOSException>(&MOOSExceptionTranslator);
399403

400-
}
401-
404+
}

0 commit comments

Comments
 (0)