used LOG instead of logging on a few stragglers
This commit is contained in:
@@ -433,9 +433,9 @@ dir but you forgot to put quotes around the directory, since it contains spaces.
|
|||||||
texopts_key = tuple(texopts.items())
|
texopts_key = tuple(texopts.items())
|
||||||
if texopts_key not in texcache:
|
if texopts_key not in texcache:
|
||||||
tex = textures.Textures(**texopts)
|
tex = textures.Textures(**texopts)
|
||||||
logging.debug("Starting to generate textures")
|
LOG.debug("Starting to generate textures")
|
||||||
tex.generate()
|
tex.generate()
|
||||||
logging.debug("Finished generating textures")
|
LOG.debug("Finished generating textures")
|
||||||
texcache[texopts_key] = tex
|
texcache[texopts_key] = tex
|
||||||
else:
|
else:
|
||||||
tex = texcache[texopts_key]
|
tex = texcache[texopts_key]
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ directory.
|
|||||||
codecs.lookup(self.preferredencoding)
|
codecs.lookup(self.preferredencoding)
|
||||||
except LookupError:
|
except LookupError:
|
||||||
self.preferredencoding = "utf_8"
|
self.preferredencoding = "utf_8"
|
||||||
logging.debug("Preferred enoding set to: %s", self.preferredencoding)
|
LOG.debug("Preferred enoding set to: %s", self.preferredencoding)
|
||||||
|
|
||||||
def get_tileset_config(self, name):
|
def get_tileset_config(self, name):
|
||||||
"Return the correct dictionary from the parsed overviewerConfig.js"
|
"Return the correct dictionary from the parsed overviewerConfig.js"
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ def parseBucketChunks(bucket, rset):
|
|||||||
if i == 250:
|
if i == 250:
|
||||||
i = 0
|
i = 0
|
||||||
cnt = 250 + cnt
|
cnt = 250 + cnt
|
||||||
logging.info("Found %d entities and %d tile entities in thread %d so far at %d chunks", len(pois['Entities']), len(pois['TileEntities']), pid, cnt);
|
LOG.info("Found %d entities and %d tile entities in thread %d so far at %d chunks", len(pois['Entities']), len(pois['TileEntities']), pid, cnt);
|
||||||
|
|
||||||
return pois
|
return pois
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ def handleEntities(rset, outputdir, render, rname, config):
|
|||||||
buckets[i].append([x,z])
|
buckets[i].append([x,z])
|
||||||
|
|
||||||
for b in buckets:
|
for b in buckets:
|
||||||
logging.info("Buckets has %d entries", len(b));
|
LOG.info("Buckets has %d entries", len(b));
|
||||||
|
|
||||||
# create the partial to lock the rset
|
# create the partial to lock the rset
|
||||||
dest = partial(parseBucketChunks, rset=rset)
|
dest = partial(parseBucketChunks, rset=rset)
|
||||||
@@ -102,7 +102,7 @@ def handleEntities(rset, outputdir, render, rname, config):
|
|||||||
pool = Pool(processes=numbuckets)
|
pool = Pool(processes=numbuckets)
|
||||||
results = pool.map(dest, buckets)
|
results = pool.map(dest, buckets)
|
||||||
|
|
||||||
logging.info("All the threads completed")
|
LOG.info("All the threads completed")
|
||||||
|
|
||||||
# Fix up all the quests in the reset
|
# Fix up all the quests in the reset
|
||||||
for data in results:
|
for data in results:
|
||||||
|
|||||||
@@ -157,12 +157,12 @@ class Textures(object):
|
|||||||
def search_dir(base):
|
def search_dir(base):
|
||||||
"""Search the given base dir for filename, in search_dirs."""
|
"""Search the given base dir for filename, in search_dirs."""
|
||||||
for path in [os.path.join(base, d, filename) for d in ['',] + search_dirs]:
|
for path in [os.path.join(base, d, filename) for d in ['',] + search_dirs]:
|
||||||
if verbose: logging.info('filename: ' + filename + ' ; path: ' + path)
|
if verbose: LOG.info('filename: ' + filename + ' ; path: ' + path)
|
||||||
if os.path.isfile(path):
|
if os.path.isfile(path):
|
||||||
return path
|
return path
|
||||||
|
|
||||||
return None
|
return None
|
||||||
if verbose: logging.info('search_zip_paths: ' + ', '.join(search_zip_paths))
|
if verbose: LOG.info('search_zip_paths: ' + ', '.join(search_zip_paths))
|
||||||
|
|
||||||
# we've sucessfully loaded something from here before, so let's quickly try
|
# we've sucessfully loaded something from here before, so let's quickly try
|
||||||
# this before searching again
|
# this before searching again
|
||||||
@@ -170,7 +170,7 @@ class Textures(object):
|
|||||||
for jarfilename in search_zip_paths:
|
for jarfilename in search_zip_paths:
|
||||||
try:
|
try:
|
||||||
self.jar.getinfo(jarfilename)
|
self.jar.getinfo(jarfilename)
|
||||||
if verbose: logging.info("Found (cached) %s in '%s'", jarfilename, self.jarpath)
|
if verbose: LOG.info("Found (cached) %s in '%s'", jarfilename, self.jarpath)
|
||||||
return self.jar.open(jarfilename)
|
return self.jar.open(jarfilename)
|
||||||
except (KeyError, IOError), e:
|
except (KeyError, IOError), e:
|
||||||
pass
|
pass
|
||||||
@@ -202,7 +202,7 @@ class Textures(object):
|
|||||||
# 2nd try with completed path.
|
# 2nd try with completed path.
|
||||||
packfilename = 'assets/minecraft/textures/' + packfilename
|
packfilename = 'assets/minecraft/textures/' + packfilename
|
||||||
pack.getinfo(packfilename)
|
pack.getinfo(packfilename)
|
||||||
if verbose: logging.info("Found %s in '%s'", packfilename, self.find_file_local_path)
|
if verbose: LOG.info("Found %s in '%s'", packfilename, self.find_file_local_path)
|
||||||
return pack.open(packfilename)
|
return pack.open(packfilename)
|
||||||
except (KeyError, IOError):
|
except (KeyError, IOError):
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user