diff options
author | R David Murray <rdmurray@bitdance.com> | 2015-10-09 14:19:33 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2015-10-09 14:19:33 (GMT) |
commit | 1a815389cccef2e28e2d27f14e71a1b708cfb20f (patch) | |
tree | 96b2c80b81916c20b03bd91988b6dac4e0b63294 /Lib/smtpd.py | |
parent | 5ae56919ab46e07e9bd6e5530cddac75e0276505 (diff) | |
download | cpython-1a815389cccef2e28e2d27f14e71a1b708cfb20f.zip cpython-1a815389cccef2e28e2d27f14e71a1b708cfb20f.tar.gz cpython-1a815389cccef2e28e2d27f14e71a1b708cfb20f.tar.bz2 |
#25328: add missing raise keyword in decode_data+SMTPUTF8 check.
This is a relatively benign bug, since having both be true was correctly
rejected at in SMTPServer even before this patch.
Patch by Xiang Zhang.
Diffstat (limited to 'Lib/smtpd.py')
-rwxr-xr-x | Lib/smtpd.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/smtpd.py b/Lib/smtpd.py index ff86e7d..732066e 100755 --- a/Lib/smtpd.py +++ b/Lib/smtpd.py @@ -137,8 +137,8 @@ class SMTPChannel(asynchat.async_chat): self.enable_SMTPUTF8 = enable_SMTPUTF8 if enable_SMTPUTF8: if decode_data: - ValueError("decode_data and enable_SMTPUTF8 cannot be set to" - " True at the same time") + raise ValueError("decode_data and enable_SMTPUTF8 cannot" + " be set to True at the same time") decode_data = False if decode_data is None: warn("The decode_data default of True will change to False in 3.6;" |