From 743a0c84b6857f232b3f44270f29720f69c49a62 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 10 Jun 2011 16:12:38 +0200 Subject: [PATCH] xbmc: add python callback error handling fix (https://github.com/xbmc/xbmc/pull/189) Signed-off-by: Stephan Raue --- ...thon_callback_error_handling_fix-0.1.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 packages/mediacenter/xbmc/patches/xbmc-10.1-Dharma-407-python_callback_error_handling_fix-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-10.1-Dharma-407-python_callback_error_handling_fix-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-10.1-Dharma-407-python_callback_error_handling_fix-0.1.patch new file mode 100644 index 0000000000..3ed7413e44 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-10.1-Dharma-407-python_callback_error_handling_fix-0.1.patch @@ -0,0 +1,39 @@ +From 4bcbf6a4a0fde61c18d8de66a8d05aa441ab6fc9 Mon Sep 17 00:00:00 2001 +From: Jim Carroll +Date: Thu, 9 Jun 2011 14:34:24 -0400 +Subject: [PATCH] Allow python error information from callbacks to make it to + the log. + +--- + xbmc/lib/libPython/xbmcmodule/pyutil.cpp | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/xbmc/lib/libPython/xbmcmodule/pyutil.cpp b/xbmc/lib/libPython/xbmcmodule/pyutil.cpp +index 9a98cdf..041f332 100644 +--- a/xbmc/lib/libPython/xbmcmodule/pyutil.cpp ++++ b/xbmc/lib/libPython/xbmcmodule/pyutil.cpp +@@ -28,6 +28,7 @@ + #include "CriticalSection.h" + #include "SingleLock.h" + #include "Application.h" ++#include "utils/log.h" + + using namespace std; + +@@ -203,6 +204,13 @@ void _PyXBMC_MakePendingCalls() + lock.Leave(); + if (p.func) + p.func(p.args); ++ ++ if (PyErr_Occurred()) ++ { ++ CLog::Log(LOGERROR,"Exception in python callback"); ++ PyErr_Print(); ++ } ++ + //(*((*iter).first))((*iter).second); + lock.Enter(); + iter = g_callQueue.begin(); +-- +1.7.5.4 +