From 2f22513494d9c5092254c428eb487510d81a7857 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 6 Jun 2019 22:30:46 +0200 Subject: Fix get_news() to work with Python 3 --- extras/autowaf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extras') diff --git a/extras/autowaf.py b/extras/autowaf.py index 7305eed..abcdc49 100644 --- a/extras/autowaf.py +++ b/extras/autowaf.py @@ -1324,7 +1324,7 @@ def get_news(in_file, entry_props={}): """ import re - import rfc822 + import email.utils f = open(in_file, 'r') entries = {} @@ -1366,7 +1366,7 @@ def get_news(in_file, entry_props={}): # Read footer line foot = f.readline() matches = re.compile(' -- (.*) <(.*)> (.*)').match(foot) - entry['date'] = rfc822.parsedate(matches.group(3)) + entry['date'] = email.utils.parsedate(matches.group(3)) entry['blamee_name'] = matches.group(1) entry['blamee_mbox'] = matches.group(2) entry.update(entry_props) -- cgit v1.2.1