question about bzrlib/changeset.py
aaron.bentley at utoronto.ca
Tue Sep 6 14:03:29 BST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Alexander Belchenko wrote:
> except OSError, e:
> if e.errno != 39:
> if conflict_handler.rmdir_non_empty(filename) == "skip":
> I have two questions.
> First, I think that comparing with constant 39 is not portable solution.
> May be it need to be:
> if e.errno != errno.ENOTEMPTY:
Sure. I wasn't aware of the errno module when I wrote that.
> Second, I not competely understand why for second call to os.rmdir (last
> line in the above fragment) if first attempt raise exception?
If the conflict handler returns "continue", rather than "skip", that
indicates that the conflict handler has done something to make the
directory empty, so the rmdir will succeed.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar