Handle s/Draft/Stable/ in send-updates.py

This commit is contained in:
Jonas Schäfer 2021-10-12 20:49:36 +02:00
parent ba6fd0856b
commit f200f3517b
2 changed files with 7 additions and 1 deletions

View File

@ -122,7 +122,7 @@ changed back to Experimental."""+STALENOTE
SUBJECT_NONPROTO_TEMPLATE = \
"{action.value}: XEP-{info[number]:04d} ({info[title]})"
"{action.display_name}: XEP-{info[number]:04d} ({info[title]})"
def dummy_info(number):

View File

@ -59,6 +59,12 @@ class Action(enum.Enum):
Status.REJECTED: cls.REJECT,
}[status]
@property
def display_name(self):
if self == self.DRAFT:
return "STABLE"
return self.value
def load_xepinfo(el):
accepted = el.get("accepted").lower() == "true"