diff options
author | Barry Warsaw <barry@python.org> | 2000-09-25 15:08:27 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2000-09-25 15:08:27 (GMT) |
commit | 2ea2b1133eb9676454bc680450bf121e1493f7a4 (patch) | |
tree | 3f0e23d48af4ca68dfec2cd3b060bb5bdb524337 | |
parent | ee76f0b2930414ff697cb5cf00aab263ad1adf20 (diff) | |
download | cpython-2ea2b1133eb9676454bc680450bf121e1493f7a4.zip cpython-2ea2b1133eb9676454bc680450bf121e1493f7a4.tar.gz cpython-2ea2b1133eb9676454bc680450bf121e1493f7a4.tar.bz2 |
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.
-rw-r--r-- | Lib/rfc822.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py index 42aac1c..2004524 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.""" |