From 2ea2b1133eb9676454bc680450bf121e1493f7a4 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 25 Sep 2000 15:08:27 +0000 Subject: [PATCH] AddrlistClass.getdomainliteral(): rfc822 requires that the domain literal be wrapped in square brackets. This fix replaces the square brackets that were previously being stripped off. Closes SF bug #110621. --- Lib/rfc822.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/rfc822.py b/Lib/rfc822.py index 42aac1c403f..20045245585 100644 --- a/Lib/rfc822.py +++ b/Lib/rfc822.py @@ -703,7 +703,7 @@ class AddrlistClass: def getdomainliteral(self): """Parse an RFC-822 domain-literal.""" - return self.getdelimited('[', ']\r', 0) + return '[%s]' % self.getdelimited('[', ']\r', 0) def getatom(self): """Parse an RFC-822 atom."""