diff options
Diffstat (limited to 'Lib/smtpd.py')
-rwxr-xr-x | Lib/smtpd.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/smtpd.py b/Lib/smtpd.py index 1e239a1..3cab264 100755 --- a/Lib/smtpd.py +++ b/Lib/smtpd.py @@ -850,8 +850,7 @@ if __name__ == '__main__': nobody = pwd.getpwnam('nobody')[2] try: os.setuid(nobody) - except OSError as e: - if e.errno != errno.EPERM: raise + except PermissionError: print('Cannot setuid "nobody"; try running with -n option.', file=sys.stderr) sys.exit(1) try: |