1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 11:19:18 +01:00

Clean module dicts properly when unloading a script - works around a bug in Python 2.7.0 only

This commit is contained in:
David Sansome 2011-01-29 00:57:58 +00:00
parent bcc35ec29c
commit 618aec2c74

View File

@ -109,6 +109,9 @@ bool PythonScript::Unload() {
}
foreach (const QString& key, keys_to_delete) {
// Workaround Python issue 10068 (only affects 2.7.0)
_PyModule_Clear(PyDict_GetItemString(modules, key.toAscii().constData()));
PyDict_DelItemString(modules, key.toAscii().constData());
}
PyEval_ReleaseLock();