Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from os.rename to shutil.move #161

Merged
merged 2 commits into from
Apr 11, 2020
Merged

Migrate from os.rename to shutil.move #161

merged 2 commits into from
Apr 11, 2020

Conversation

mcclurec
Copy link
Contributor

os.rename is brittle and prone to failure. Among other things, it struggles with moving files between mount points. Something that's required if you have docker volumes.

See article for more info
https://giedrius.blog/2018/01/28/why-os-move-sometimes-does-not-work-and-why-shutil-move-is-the-savior/

Should also address #154

`os.rename` is brittle and prone to failure. Among other things, it struggles with moving files between mount points. Something that's required if you have docker volumes. Should also address dbr#154
@dbr
Copy link
Owner

dbr commented Nov 18, 2019

Thanks for the pull request!

This seems like a good change. I think this obsoletes the is_same_partition code and accompanying logic - would you have the time to look at removing that also in this PR?

(writing from a phone, so excuse the short explanation - let me know if it's unclear what I'm describing!)

@mcclurec
Copy link
Contributor Author

@dbr I've removed the partition check. Looks like there are some flakey tests. Unexpected show returns from TVDB. Not sure if it's region related.

@dbr
Copy link
Owner

dbr commented Apr 11, 2020

Sorry for the delay - cool, these changes look good to me. Thanks!

As you say, the tests failing are due to flakeyness with the tests using live data (e.g one of the tests was relying on a fake show not returning any results, but now is)

@dbr dbr merged commit f3f5db3 into dbr:master Apr 11, 2020
@dbr dbr added this to the v2.6 milestone Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants