From: Jack Jansen Date: Thu, 14 Sep 2000 20:47:00 +0000 (+0000) Subject: Fixes that should make it possible to run Python on machines without NavServices... X-Git-Tag: v2.0b2~322 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04b85498b80fb4f54fecc9447cc3bff54b3a23e4;p=python Fixes that should make it possible to run Python on machines without NavServices installed. --- diff --git a/Mac/Modules/Nav.c b/Mac/Modules/Nav.c index d229458b9d..d8ef6ef448 100644 --- a/Mac/Modules/Nav.c +++ b/Mac/Modules/Nav.c @@ -947,6 +947,11 @@ initNav() { PyObject *m, *d; + /* Test that we have NavServices */ + if ( !NavServicesAvailable() ) { + PyErr_SetString(PyExc_ImportError, "Navigation Services not available"); + return; + } /* Create the module and add the functions */ m = Py_InitModule4("Nav", nav_methods, Nav_module_documentation,