diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2000-09-14 20:47:00 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2000-09-14 20:47:00 (GMT) |
commit | 04b85498b80fb4f54fecc9447cc3bff54b3a23e4 (patch) | |
tree | 6f11ce9a469cb14e17de0bf72133377e328b308b | |
parent | 5c204ae15f57c13bf5df7c04a41afed16e8c667f (diff) | |
download | cpython-04b85498b80fb4f54fecc9447cc3bff54b3a23e4.zip cpython-04b85498b80fb4f54fecc9447cc3bff54b3a23e4.tar.gz cpython-04b85498b80fb4f54fecc9447cc3bff54b3a23e4.tar.bz2 |
Fixes that should make it possible to run Python on machines without NavServices installed.
-rw-r--r-- | Mac/Modules/Nav.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Mac/Modules/Nav.c b/Mac/Modules/Nav.c index d229458..d8ef6ef 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, |