[Scons-dev] Symbolic linking files
David García Garzón
david.garcia at upf.edu
Mon Dec 30 09:21:03 EST 2013
-----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-----
More information about the Scons-dev
mailing list