|
@ -61,6 +61,11 @@ def RepresentsFloat(s): |
|
|
except ValueError: |
|
|
except ValueError: |
|
|
return False |
|
|
return False |
|
|
|
|
|
|
|
|
|
|
|
def view_traceback(): |
|
|
|
|
|
ex_type, ex, tb = sys.exc_info() |
|
|
|
|
|
traceback.print_tb(tb) |
|
|
|
|
|
del tb |
|
|
|
|
|
|
|
|
def get_dict_modified_by_conf_file(this_dict, path,assignment_operator="="): |
|
|
def get_dict_modified_by_conf_file(this_dict, path,assignment_operator="="): |
|
|
results = None |
|
|
results = None |
|
|
#print ("Checking "+str(path)+" for settings...") |
|
|
#print ("Checking "+str(path)+" for settings...") |
|
@ -666,10 +671,10 @@ class MTChunks: |
|
|
self.chunks[chunk_luid].load_yaml(yaml_path) |
|
|
self.chunks[chunk_luid].load_yaml(yaml_path) |
|
|
|
|
|
|
|
|
def print_file(path, indent=""): |
|
|
def print_file(path, indent=""): |
|
|
|
|
|
try: |
|
|
if os.path.isfile(path): |
|
|
if os.path.isfile(path): |
|
|
if indent is None: |
|
|
if indent is None: |
|
|
indent = "" |
|
|
indent = "" |
|
|
try: |
|
|
|
|
|
ins = open(path, 'r') |
|
|
ins = open(path, 'r') |
|
|
line = True |
|
|
line = True |
|
|
while line: |
|
|
while line: |
|
@ -677,10 +682,10 @@ class MTChunks: |
|
|
if line: |
|
|
if line: |
|
|
print(indent+line) |
|
|
print(indent+line) |
|
|
ins.close() |
|
|
ins.close() |
|
|
except: |
|
|
|
|
|
print(indent+"print_file: could not finish") |
|
|
|
|
|
else: |
|
|
else: |
|
|
print (indent+"print_file: missing path") |
|
|
print (indent+"print_file: missing path") |
|
|
|
|
|
except: |
|
|
|
|
|
print(indent+"print_file: could not finish") |
|
|
|
|
|
|
|
|
# normally call check_chunk instead, which renders chunk only if necessary |
|
|
# normally call check_chunk instead, which renders chunk only if necessary |
|
|
def _render_chunk(self, x, z): |
|
|
def _render_chunk(self, x, z): |
|
@ -778,8 +783,10 @@ class MTChunks: |
|
|
|
|
|
|
|
|
except: |
|
|
except: |
|
|
print (min_indent+"Could not finish deleting/moving output") |
|
|
print (min_indent+"Could not finish deleting/moving output") |
|
|
|
|
|
view_traceback() |
|
|
except: |
|
|
except: |
|
|
print(min_indent+"Could not finish deleting/moving temp files") |
|
|
print(min_indent+"Could not finish deleting/moving temp files") |
|
|
|
|
|
view_traceback() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result |
|
|
return result |
|
|