summaryrefslogtreecommitdiffstats
path: root/users.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-04-23 13:01:35 -0400
committerChris Lumens <clumens@redhat.com>2009-04-23 14:17:14 -0400
commitcfac7bcb2079b463e33c2401002575d0de12d9b2 (patch)
tree488fb8e49604b3245dca24961fda684888bd56d8 /users.py
parent11bbfaa2b00d1a212462c689834a9179b15cb843 (diff)
downloadanaconda-cfac7bcb2079b463e33c2401002575d0de12d9b2.tar.gz
anaconda-cfac7bcb2079b463e33c2401002575d0de12d9b2.tar.xz
anaconda-cfac7bcb2079b463e33c2401002575d0de12d9b2.zip
When catching an OSError, handle it as an object instead of a tuple (#497374).
Diffstat (limited to 'users.py')
-rw-r--r--users.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/users.py b/users.py
index a146aa214..ec9aa051f 100644
--- a/users.py
+++ b/users.py
@@ -145,8 +145,8 @@ class Users:
try:
(pid, status) = os.waitpid(childpid, 0)
- except OSError, (num, msg):
- log.critical("exception from waitpid while creating a user: %s %s" % (num, msg))
+ except OSError as e:
+ log.critical("exception from waitpid while creating a user: %s %s" % (e.errno, e.strerror))
return False
if os.WIFEXITED(status) and (os.WEXITSTATUS(status) == 0):