summaryrefslogtreecommitdiff
path: root/Lib/smtpd.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/smtpd.py')
-rwxr-xr-xLib/smtpd.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/smtpd.py b/Lib/smtpd.py
index f28036a5b4..457cef64e0 100755
--- a/Lib/smtpd.py
+++ b/Lib/smtpd.py
@@ -846,7 +846,7 @@ if __name__ == '__main__':
if options.setuid:
try:
import pwd
- except ImportError:
+ except ModuleNotFoundError:
print('Cannot import module "pwd"; try running with -n option.', file=sys.stderr)
sys.exit(1)
nobody = pwd.getpwnam('nobody')[2]