view website/issues/detectors/severityauditor.py @ 4579:ba4c632143f6

issue2550535 Fix keep_quoted_text=yes setting. In some cases even when keep_quoted_text=yes is configured we would strip quoted sections. This hit the python bug-tracker especially for python interpreter examples with leading '>>>' strings. The fix is slightly different compared to the proposal as this broke keep_quoted_text=no in certain cases. We also fix a bug where keep_quoted_text=no would drop the last line of a non-quoted section if there wasn't an empty line between the next quotes.
author Ralf Schlatterbeck <rsc@runtux.com>
date Thu, 05 Jan 2012 20:55:47 +0100
parents c2d0d3e9099d
children 0942fe89e82e
line wrap: on
line source


def init_severity(db, cl, nodeid, newvalues):
    """Make sure severity is set on new issues"""
    if newvalues.has_key('severity') and newvalues['severity']:
        return

    normal = db.severity.lookup('normal')
    newvalues['severity'] = normal

def init(db):
    db.issue.audit('create', init_severity)

Roundup Issue Tracker: http://roundup-tracker.org/