Changeset efbd885d7c8e6cecb1c6fccc45f845249630e0e1
- Timestamp:
- 06/29/07 02:39:46 (6 years ago)
- Author:
- dsmith <dsmith@…>
- Children:
- 1c06490e971a413d37373d5eb89a236149e61a94
- Parents:
- cfb368e1db62670a62e73af5ee589e663e9dc999
- git-author:
- L. Donnie Smith <donnie.smith@…> (06/29/07 02:39:46)
- git-committer:
- dsmith <dsmith@…> (06/29/07 02:39:46)
- Message:
-
supress wminput errors for nonexistent python plugins
git-svn-id: http://abstrakraft.org/cwiid/svn/trunk@133 918edb2d-ff29-0410-9de2-eb38e7f22bc7
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rbb2d26b
|
refbd885
|
|
| 8 | 8 | wminput |
| 9 | 9 | * rewrote ir_ptr plugin |
| | 10 | * supress error for nonexistent python plugins |
| 10 | 11 | |
| 11 | 12 | 2007-06-18 L. Donnie Smith <cwiid@abstrakraft.org> |
-
|
ra498060
|
refbd885
|
|
| 16 | 16 | * |
| 17 | 17 | * ChangeLog: |
| | 18 | * 2007-06-28 L. Donnie Smith <cwiid@abstrakraft.org> |
| | 19 | * * supress error for nonexistent python plugins |
| | 20 | * |
| 18 | 21 | * 2007-06-18 L. Donnie Smith <cwiid@abstrakraft.org> |
| 19 | 22 | * * revised error messages |
| … |
… |
|
| 201 | 204 | PyObject *handle, *info; |
| 202 | 205 | PyObject *PyStr; |
| | 206 | PyObject *PyErrType, *PyErr, *PyTraceback; |
| 203 | 207 | |
| 204 | 208 | if (!(PyStr = PyString_FromString(dir))) { |
| … |
… |
|
| 213 | 217 | |
| 214 | 218 | if (!(handle = PyImport_ImportModule(plugin->name))) { |
| 215 | | /* TODO: print only syntax errors, not "module not found errors" */ |
| 216 | | PyErr_Print(); |
| | 219 | /* ignore "module not found" errors in top level module */ |
| | 220 | PyErr_Fetch(&PyErrType, &PyErr, &PyTraceback); |
| | 221 | PyErr_NormalizeException(&PyErrType, &PyErr, &PyTraceback); |
| | 222 | if (PyErr_GivenExceptionMatches(PyErr, PyExc_ImportError) && |
| | 223 | !PyTraceback) { |
| | 224 | Py_XDECREF(PyErrType); |
| | 225 | Py_XDECREF(PyErr); |
| | 226 | } |
| | 227 | else { |
| | 228 | PyErr_Restore(PyErrType, PyErr, PyTraceback); |
| | 229 | PyErr_Print(); |
| | 230 | } |
| | 231 | |
| 217 | 232 | if (PySequence_DelItem(PyPath, 0)) { |
| 218 | 233 | PyErr_Print(); |