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.
This commit is contained in:
Barry Warsaw 2000-09-25 15:08:27 +00:00
parent ee76f0b293
commit 2ea2b1133e
1 changed files with 1 additions and 1 deletions

View File

@ -703,7 +703,7 @@ class AddrlistClass:
def getdomainliteral(self): def getdomainliteral(self):
"""Parse an RFC-822 domain-literal.""" """Parse an RFC-822 domain-literal."""
return self.getdelimited('[', ']\r', 0) return '[%s]' % self.getdelimited('[', ']\r', 0)
def getatom(self): def getatom(self):
"""Parse an RFC-822 atom.""" """Parse an RFC-822 atom."""