Re: [PATCH] Use shutil.move when os.rename fails


Devendra Tewari
 

I did try that but got an error that does not happen when we try os.rename first. I'll try to reproduce it again.

I suspect there may be subtle differences in os.rename vs shutil.move with respect to what happens when origin and/or destination do not exist or are invalid.

On 29 Mar 2021, at 20:00, Andre McCurdy <armccurdy@...> wrote:

On Mon, Mar 29, 2021 at 3:45 PM Devendra Tewari
<devendra.tewari@...> wrote:

Thanks! My bad. The example I looked up in Python docs had a break and I just realized it was a looping example.

Here’s the updated patch (or should I submit it again via git send-email?)
It would be better to use shutil.move unconditionally in all cases,
rather than have a separate shutil.move code path which only gets
tested by people doing incremental builds in docker.

Join {openembedded-core@lists.openembedded.org to automatically receive all group messages.