On Wed, Jan 11, 2012 at 12:38 PM, Phil Holmes <m...@philholmes.net> wrote:
> ----- Original Message ----- From: <julien.ri...@gmail.com>
> To: <philehol...@googlemail.com>; <gra...@percival-music.ca>;
> <em...@philholmes.net>; <m...@philholmes.net>
> Cc: <lilypond-devel@gnu.org>; <re...@codereview-hr.appspotmail.com>
> Sent: Tuesday, January 10, 2012 1:34 PM
> Subject: Re: Sketch of not remaking html files (issue 5498093)
>
>
>
>> Checking the file timestamps will be a good thing. It might be better to
>> just replace the whole www_post script by make rules, but in the current
>> implementation this is a good improvement.
>>
>> Just a style thing, in general I notice that you use "function(arg)"
>> while the rest of python source code in the lilypond tree uses "function
>> (arg)". I don't like the extra space myself but I prefer keeping to one
>> consistent style.
>
>
> Will try to pick this up.
>
>
>> My other comment is similar to Graham's:
>>
>>
>> http://codereview.appspot.com/5498093/diff/5001/scripts/build/www_post.py
>> File scripts/build/www_post.py (right):
>>
>>
>> http://codereview.appspot.com/5498093/diff/5001/scripts/build/www_post.py#newcode83
>> scripts/build/www_post.py:83: sys.exc_clear()
>> Why do you catch this exception? Would it not be sufficient to test for
>> the existence of the destination file?
>>
>> http://codereview.appspot.com/5498093/
>>
>
> TBH, I don't understand the function of os.link - and catching an exception
> when it failed worked perfectly.  If you have a better suggestion, I'd
> happily adopt it.
>
> --
> Phil Holmes
>
>

What I have in mind is something very similar to what you did with
os.mkdir a few lines above. So for example

for f in hardlinked_files:
    dest = strip_file_name[t] (f)
    if not os.path.exists (dest):
        os.link (f, dest)

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to