On Mon, Nov 03, 2008 at 03:51:26PM -0800, Brock Pytlik wrote: > Actually, if try block only contained the mktemp call, and returned in > the except block, wouldn't that mean that 'pf = os.fdopen(...)' could be > moved outside of the try block, or can mkstemp create temp files that are > unwritable? If not, then I think this entire region can be simplified to: > > try: > pfd, ptmp = \ > tempfile.mkstemp(dir=os.path.dirname(pickle_file)) > except EnvironmentError: > return > pf = os.fdopen(pfd, "wb") > > Wouldn't that accomplish the same goals?
Yes, it would; thank you. I've moved the fdopen call into the next try block, and am considering pulling the chmod and rename into it as well. Thanks much, Danek _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
