~ubuntu-archive/ubuntu-archive-scripts/trunk

« back to all changes in this revision

Viewing changes to templates/team-report.html

  • Committer: Sebastien Bacher
  • Author(s): Iain Lane
  • Date: 2020-04-07 10:03:02 UTC
  • mfrom: (270.1.1 ubuntu-archive-scripts)
  • Revision ID: seb128@ubuntu.com-20200407100302-lu5theinxgog30c6
generate-team-p-m: Handle a missing policy_info

Migration items for binaries only "foo/arch" don't have policies run for them
but we currently assume they do, and crash when we can't find the "policy_info"
dict entry.

Handle it being missing. Return "-1" for the age and treat that as being
unknown: it's not output for these entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        {% else %}
44
44
        in proposed for
45
45
        {% endif %}
 
46
        {% if prob.age == -1 %}
 
47
        an unknown number of days
 
48
        {% else %}
46
49
        {{ ngettext("%(num)d day", "%(num)d days", prob.age|int) }}
 
50
        {% endif %}
47
51
        <ul>
48
52
          {% if d["policy_info"]["update-excuse"] %}
49
53
          <li>Excuses bugs: