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 @@ def getcomment(self): 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."""