]> granicus.if.org Git - python/commitdiff
Fixes that should make it possible to run Python on machines without NavServices...
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 14 Sep 2000 20:47:00 +0000 (20:47 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 14 Sep 2000 20:47:00 +0000 (20:47 +0000)
Mac/Modules/Nav.c

index d229458b9de6516fe564e76aab345977add2bf37..d8ef6ef4483a431de4015f8b80000b4f77396945 100644 (file)
@@ -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,