0

Better error messages, removed import which triggered a failure

This commit is contained in:
Xon
2011-03-25 21:42:18 +08:00
parent 1d5b338d56
commit 6c9bbc25da
2 changed files with 9 additions and 6 deletions

View File

@@ -32,8 +32,6 @@ import util
logging.basicConfig(level=logging.INFO,format="%(asctime)s [%(levelname)s] %(message)s") logging.basicConfig(level=logging.INFO,format="%(asctime)s [%(levelname)s] %(message)s")
#import this before to ensure it doesn't have an errors or c_overviewer will eat them
import chunk
# make sure the c_overviewer extension is available # make sure the c_overviewer extension is available
try: try:
import c_overviewer import c_overviewer

View File

@@ -32,11 +32,16 @@ int init_chunk_render(void) {
if (blockmap) return 1; if (blockmap) return 1;
textures = PyImport_ImportModule("textures"); textures = PyImport_ImportModule("textures");
chunk_mod = PyImport_ImportModule("chunk");
/* ensure none of these pointers are NULL */ /* ensure none of these pointers are NULL */
if ((!textures) || (!chunk_mod)) { if ((!textures)) {
fprintf(stderr, "\ninit_chunk_render failed\n"); fprintf(stderr, "\ninit_chunk_render failed to load; textures\n");
return 1;
}
chunk_mod = PyImport_ImportModule("chunk");
/* ensure none of these pointers are NULL */
if ((!chunk_mod)) {
fprintf(stderr, "\ninit_chunk_render failed to load; chunk\n");
return 1; return 1;
} }