feat: change makedir implementation to be os agnostic#456
Merged
Conversation
jenhagg
commented
Apr 21, 2021
| _, _, stderr = self._data_access.makedir(self.TMP_DIR) | ||
| if len(stderr.readlines()) != 0: | ||
| raise IOError("Failed to create %s on server" % self.TMP_DIR) | ||
| self._data_access.makedir(self.REL_TMP_DIR) |
Collaborator
Author
There was a problem hiding this comment.
This previously worked since one path was a prefix of the other one. Just changed so it's consistent with the assumption in makedir that we are using a relative path.
Collaborator
There was a problem hiding this comment.
do we need to keep the TMP_DIR attribute defined in the constructor?
Collaborator
Author
There was a problem hiding this comment.
Good catch, it's not used anywhere now
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Breaking the refactoring to support native windows users into smaller chunks. This one simply defines the
DataAccess.makedirmethod separately for local/ssh subclasses.What the code is doing
Change
mkdircommand toos.makedirsfor local calls.Testing
Ran
prepare_simulation_input()on new scenario in fresh container. The code used for the server is the same as before.Time estimate
5 min