Changeset 712 for mds-and-trees


Ignore:
Timestamp:
10/06/17 19:07:47 (7 years ago)
Author:
Maciej Komosinski
Message:

Improved status and error messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mds-and-trees/tree-genealogy.py

    r711 r712  
    717717                creature = json.loads(input)
    718718            except ValueError:
    719                 print("Json format error - the line cannot be read. Breaking the loading loop.")
     719                print("Json format error: the line cannot be read. Breaking the loading loop.")
    720720                # fixing arrays by removing the last element
    721721                # ! assuming that only the last line is broken !
     
    780780                    if line_arr[0] == "[OFFSPRING]":
    781781                        nodes_offspring += 1
    782         # assuming that either BORN or OFFSPRING is present for each individual (as it should...)
     782        # assuming that either BORN or OFFSPRING, or both, are present for each individual
    783783        nodes = max(nodes_born, nodes_offspring)
    784784        nodes = min(nodes, max_nodes if max_nodes != 0 else nodes)+1
     
    803803            time_offset = max_time
    804804            if max_time != 0:
    805                 print("NOTE: merging the files, the time offset for the file " + filename + " is: " + str(time_offset))
     805                print("NOTE: merging files, assuming cumulative time offset for '%s' to be %d" % (filename, time_offset))
    806806
    807807            lasttime = timelib.time()
     
    845845                            load_creature_props(creature)
    846846                        else:
    847                             print("NOTE: entry about the death of individual " + creature["ID"] + " before it was born")
     847                            print("NOTE: encountered [DIED] entry for individual " + creature["ID"] + " before it was born")
    848848
    849849                # debug
Note: See TracChangeset for help on using the changeset viewer.