Skip to content

Fix past.translation on read-only file systems #344

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

Merged

Conversation

leafty
Copy link
Contributor

@leafty leafty commented Jul 10, 2018

This PR solves an issue encountered with past.translation on a read-only file system (usecase: snap).

The code already contains a try/except block handling this issue for attempting to write files in the __pycache__ directory, but the creation of __pycache__ itself is not included in the block.

This simply moves the os.makedirs code to be inside the try/except block so that past.translation can work on read-only file systems.

@leafty leafty changed the title os.makedirs can fail Fix past.translation on read-only file systems Jul 10, 2018
@jmadler
Copy link
Contributor

jmadler commented Sep 7, 2018

LGTM

@jmadler jmadler merged commit ab9acdb into PythonCharmers:v0.16.x Sep 10, 2018
jmadler added a commit that referenced this pull request Sep 10, 2018
@leafty leafty deleted the fix-read-only branch September 11, 2018 11:24
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