On Fri, Jun 27, 2008 at 08:33:37AM -0500, Tom Mueller wrote: > Danek Duvall wrote: >> On Thu, Jun 26, 2008 at 05:29:11PM -0500, Tom Mueller (pkg-discuss) wrote: >> >> >>> http://cr.opensolaris.org/~tmueller/cr-2209,2222,2343/ >>> >> >> license.py >> >> - line 77: you're not actually making sure the directory is writable, >> just that it exists. I'd change the comment to match the code. >> >> - line 80: this could be an "elif", as path couldn't exist if the >> directory hadn't previously. >> > both fixed. Code now is: > > # make sure the directory exists and the file is writable > if not os.path.exists(os.path.dirname(path)): > self.makedirs(os.path.dirname(path), mode=755) > elif os.path.exists(path): > os.chmod(path, 0644)
Looks fine, though it appears there's a latent bug in the existing code, which I think you should just go ahead and fix -- the mode in the makedirs should be 0755, not 755, as I don't think it figures out that you passed in decimal when you meant octal. Danek _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
