Merge of descr-branch back into trunk.
diff --git a/Python/import.c b/Python/import.c
index 82524f6..a2106de 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -43,7 +43,7 @@
 /* XXX Perhaps the magic number should be frozen and a version field
    added to the .pyc file header? */
 /* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */
-#define MAGIC (60420 | ((long)'\r'<<16) | ((long)'\n'<<24))
+#define MAGIC (60717 | ((long)'\r'<<16) | ((long)'\n'<<24))
 
 /* Magic word as global; note that _PyImport_Init() can change the
    value of this global to accommodate for alterations of how the
@@ -1968,8 +1968,11 @@
 	}
 
 	/* Get the __import__ function from the builtins */
-	if (PyDict_Check(builtins))
+	if (PyDict_Check(builtins)) {
 		import = PyObject_GetItem(builtins, import_str);
+		if (import == NULL)
+			PyErr_SetObject(PyExc_KeyError, import_str);
+	}
 	else
 		import = PyObject_GetAttr(builtins, import_str);
 	if (import == NULL)