From fa1e27d8d2a907be656f07a43c00d0ec379c5c54 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Fri, 8 Sep 2000 10:21:44 +0000 Subject: [PATCH] Got rid of Py_FatalError calls. --- Mac/Modules/Nav.c | 3 --- Mac/Modules/Printingmodule.c | 3 --- Mac/Modules/macosmodule.c | 8 ++++---- Mac/Modules/qd/qdsupport.py | 2 +- Mac/Modules/waste/wastesupport.py | 2 +- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Mac/Modules/Nav.c b/Mac/Modules/Nav.c index 7a8abc415bd..d229458b9de 100644 --- a/Mac/Modules/Nav.c +++ b/Mac/Modules/Nav.c @@ -964,8 +964,5 @@ initNav() my_previewProcUPP = NewNavPreviewProc(my_previewProc); my_filterProcUPP = NewNavObjectFilterProc(my_filterProc); - /* Check for errors */ - if (PyErr_Occurred()) - Py_FatalError("can't initialize module Nav"); } diff --git a/Mac/Modules/Printingmodule.c b/Mac/Modules/Printingmodule.c index 5f1ac5783bc..e0c4017a6fc 100644 --- a/Mac/Modules/Printingmodule.c +++ b/Mac/Modules/Printingmodule.c @@ -461,8 +461,5 @@ initPrinting() /* XXXX Add constants here */ - /* Check for errors */ - if (PyErr_Occurred()) - Py_FatalError("can't initialize module Printing"); } diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c index d373b7e43b4..ec52da4e8ee 100644 --- a/Mac/Modules/macosmodule.c +++ b/Mac/Modules/macosmodule.c @@ -710,11 +710,11 @@ initMacOS() /* Initialize MacOS.Error exception */ MacOS_Error = PyMac_GetOSErrException(); if (MacOS_Error == NULL || PyDict_SetItemString(d, "Error", MacOS_Error) != 0) - Py_FatalError("can't define MacOS.Error"); + return; Rftype.ob_type = &PyType_Type; Py_INCREF(&Rftype); if (PyDict_SetItemString(d, "ResourceForkType", (PyObject *)&Rftype) != 0) - Py_FatalError("can't define MacOS.ResourceForkType"); + return; /* ** This is a hack: the following constant added to the id() of a string ** object gives you the address of the data. Unfortunately, it is needed for @@ -725,10 +725,10 @@ initMacOS() long off = (long)&(p->ob_sval[0]); if( PyDict_SetItemString(d, "string_id_to_buffer", Py_BuildValue("i", off)) != 0) - Py_FatalError("Can't define MacOS.string_id_to_buffer"); + return; } if (PyDict_SetItemString(d, "AppearanceCompliant", Py_BuildValue("i", PyMac_AppearanceCompliant)) != 0) - Py_FatalError("can't define MacOS.AppearanceCompliant"); + return; } diff --git a/Mac/Modules/qd/qdsupport.py b/Mac/Modules/qd/qdsupport.py index d4935740ca3..9364a0bd832 100644 --- a/Mac/Modules/qd/qdsupport.py +++ b/Mac/Modules/qd/qdsupport.py @@ -103,7 +103,7 @@ variablestuff = """ o = QDGA_New(); if (o == NULL || PyDict_SetItemString(d, "qd", o) != 0) - Py_FatalError("can't initialize Qd.qd"); + return; } """ diff --git a/Mac/Modules/waste/wastesupport.py b/Mac/Modules/waste/wastesupport.py index 371ae8b69b0..e2268eee7e9 100644 --- a/Mac/Modules/waste/wastesupport.py +++ b/Mac/Modules/waste/wastesupport.py @@ -292,7 +292,7 @@ class WEOObjectDefinition(GlobalObjectDefinition): variablestuff = """ callbackdict = PyDict_New(); if (callbackdict == NULL || PyDict_SetItemString(d, "callbacks", callbackdict) != 0) - Py_FatalError("can't initialize Waste.callbackdict"); + return; upp_new_handler = NewWENewObjectProc(my_new_handler); upp_dispose_handler = NewWEDisposeObjectProc(my_dispose_handler); upp_draw_handler = NewWEDrawObjectProc(my_draw_handler);