-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I was trying the new versioned library feature in 2.3.0, and i ran into
the bug of creating symlinks that already exists when rebuilding. A bug
which has been already fixed on the development branch. Great!

By looking at the fix, i wonder why this:

  try:
      os.remove(target)
  except OSError :
      pass
  os.symlink(src, target)

is not encapsuled in any function which makes the code shorter and
drives away the temptation of writting again just:

  os.symlink(src, target)

And being encapsulated, non-repeated code, we could dare to build a more
fail prove version such as

    try:
        os.symlink(src, target)
    except OSError, e:
        if e.errno == errno.EEXIST:
            os.remove(target)
            os.symlink(src, target)
        raise

Seems a quite easy patch even for me to create, but my question, is,
where such a function should be in SCons? A Command? FS?


David.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iF4EAREIAAYFAlLBgU8ACgkQxP0Ao7s0JugFrQD/SC00mcY6e6PkiQY1pECOkq4u
mZ+qJRpwnxwFVlEZqg0A/RA3lUm9pJbvS3C/YyXkWQcrWNx2Iulcj35BqmeMPjI4
=jxdc
-----END PGP SIGNATURE-----


_______________________________________________
Scons-dev mailing list
[email protected]
http://two.pairlist.net/mailman/listinfo/scons-dev

Reply via email to