[pypy-svn] r56353 - in pypy/dist/pypy/module/posix: . test
cfbolz at codespeak.net
cfbolz at codespeak.net
Mon Jul 7 16:11:56 CEST 2008
Author: cfbolz
Date: Mon Jul 7 16:11:55 2008
New Revision: 56353
Modified:
pypy/dist/pypy/module/posix/interp_posix.py
pypy/dist/pypy/module/posix/test/test_posix2.py
Log:
setgid has the same problem
Modified: pypy/dist/pypy/module/posix/interp_posix.py
==============================================================================
--- pypy/dist/pypy/module/posix/interp_posix.py (original)
+++ pypy/dist/pypy/module/posix/interp_posix.py Mon Jul 7 16:11:55 2008
@@ -584,7 +584,10 @@
Set the current process's group id.
"""
- os.setgid(arg)
+ try:
+ os.setgid(arg)
+ except OSError, e:
+ raise wrap_oserror(space, e)
return space.w_None
setgid.unwrap_spec = [ObjSpace, int]
Modified: pypy/dist/pypy/module/posix/test/test_posix2.py
==============================================================================
--- pypy/dist/pypy/module/posix/test/test_posix2.py (original)
+++ pypy/dist/pypy/module/posix/test/test_posix2.py Mon Jul 7 16:11:55 2008
@@ -316,6 +316,11 @@
os = self.posix
assert os.getgid() == self.getgid
+ if hasattr(os, 'setgid'):
+ def test_os_setgid_error(self):
+ os = self.posix
+ raises(OSError, os.setgid, -100000)
+
if hasattr(os, 'sysconf'):
def test_os_sysconf(self):
os = self.posix
More information about the Pypy-commit
mailing list