Ignore:
Timestamp:
05/10/15 06:44:20 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

A go-around is logged as a fault with no score and an explanation is required (re #266)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/logger.py

    r604 r634  
    186186    NO_GO_SCORE = 10000
    187187
     188    NO_SCORE = 9999
     189
    188190    def __init__(self, output):
    189191        """Construct the logger."""
     
    271273        fault = self._faults[faultID] if faultID in self._faults else None
    272274
     275        text = "%s (NO GO)" % (what) if score==Logger.NO_GO_SCORE \
     276               else "%s" % (what,) if score==Logger.NO_SCORE \
     277               else "%s (%.1f)" % (what, score)
     278
     279        if score==Logger.NO_SCORE:
     280            score = 0
     281
    273282        if fault is not None and score<=fault.score:
    274283            return fault.getLatestEntry().id if updatePrevious else -1
    275 
    276         text = "%s (NO GO)" % (what) if score==Logger.NO_GO_SCORE \
    277                else "%s (%.1f)" % (what, score)
    278284
    279285        if updatePrevious and fault is not None:
Note: See TracChangeset for help on using the changeset viewer.