[Python-checkins] peps: cleanup date field after keyword expansion

benjamin.peterson python-checkins at python.org
Tue Oct 7 18:13:51 CEST 2014


https://hg.python.org/peps/rev/4591de6e1f15
changeset:   5574:4591de6e1f15
user:        Benjamin Peterson <benjamin at python.org>
date:        Tue Oct 07 12:11:48 2014 -0400
summary:
  cleanup date field after keyword expansion

files:
  pep2html.py |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/pep2html.py b/pep2html.py
--- a/pep2html.py
+++ b/pep2html.py
@@ -228,6 +228,8 @@
         elif k.lower() in ('last-modified',):
             date = v or time.strftime('%d-%b-%Y',
                                       time.localtime(os.stat(inpath)[8]))
+            if date.startswith('$' 'Date: ') and date.endswith(' $'):
+                date = date[6:-2]
             if basename == 'pep-0000.txt':
                 v = date
             else:

-- 
Repository URL: https://hg.python.org/peps


More information about the Python-checkins mailing list