On 15 September 2014 15:47, Mike Looijmans <mike.looijm...@topic.nl> wrote:
> It's just that the try/except version will always work on any system,
> whereas the device comparison may fail on some setups. And given the habit
> of programmers to copy these things from other locations, chances are that a
> device comparison will some day be used on the "downloads" directory which
> is FAT on my system.
>
> Also, when the copy fails, the resulting message should be clearer, as the
> "copyfile" call will be in the stacktrace.

I believe this is called the "try and ask forgiveness" pattern.  It's
race-free, too.

Ross
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to