This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients eric.smith, neologix, sandro.tosi
Date 2011-05-26.22:20:05
SpamBayes Score 0.00040730654
Marked as misclassified No
Message-id <1306448406.09.0.168086365192.issue12191@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-05-26 22:20:06neologixsetrecipients: + neologix, eric.smith, sandro.tosi
2011-05-26 22:20:06neologixsetmessageid: <1306448406.09.0.168086365192.issue12191@psf.upfronthosting.co.za>
2011-05-26 22:20:05neologixlinkissue12191 messages
2011-05-26 22:20:05neologixcreate