Message137011
I didn't test, but after skimming through the code I think that if an invalid user name/group name is provided, os.chown is passed None, which will fail with ValueError.
It would be better to raise an explicit error like "no such user" / "no such group".
That's something you could add to the tests.
Also, you could initialize _user to -1 instead of None, and replace
if user is None:
_user = -1
else:
[...]
with
if user is not None:
[...]
Same goes for _group. |
|
Date |
User |
Action |
Args |
2011-05-26 22:20:06 | neologix | set | recipients:
+ neologix, eric.smith, sandro.tosi |
2011-05-26 22:20:06 | neologix | set | messageid: <1306448406.09.0.168086365192.issue12191@psf.upfronthosting.co.za> |
2011-05-26 22:20:05 | neologix | link | issue12191 messages |
2011-05-26 22:20:05 | neologix | create | |
|