On 04/20/11 12:46 PM, Danek Duvall wrote:
Shawn Walker wrote:
http://cr.opensolaris.org/~swalker/pkg-17676/
Looks good, but I don't understand the purpose of the while 1 (which I
think would more idiomatically be while True). AFAICT, it only loops if
Optimisation habit (which isn't necessary here so I'll change it),
details follow:
http://stackoverflow.com/questions/3815359/while-1-vs-for-whiletrue-why-is-there-a-difference
you get an exception that isn't an EnvironmentError.
No, if you get an exception that's not an EnvironmentError, that
exception would be raised immediately, so no loop would occur.
The looping occurs in the case of lines 286-287 in the event the parent
directory of the file doesn't exist already. Looping this way allows me
to re-use the exception handling that would normally happen if an insert
failed but the parent directory already existed instead of having to
repeat that logic again.
If it doesn't seem that way, speak up, because that might mean I'm doing
something wrong.
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss