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

Converting windows newlines to \n #165

Closed
wants to merge 7 commits into from
Closed

Converting windows newlines to \n #165

wants to merge 7 commits into from

Conversation

xtanion
Copy link

@xtanion xtanion commented May 20, 2023

What It Does

fixes #104

How to Test

upload a file generated from Windows (and contains newlines), printing before and after file_contents in upload_file_to_dsn confirms the changes.

Review Checklist
I certify that I have:

Amber Torrise and others added 7 commits May 8, 2023 10:14
@t1m0thyj t1m0thyj changed the base branch from legacy to main May 24, 2023 21:08
@JTonda JTonda requested review from t1m0thyj and KevinLoesch1 May 31, 2023 15:16
@t1m0thyj
Copy link
Member

@xtanion Thanks for your contribution!

Closing this PR because the "main" branch has been updated to have a different implementation of upload_file_to_dsn:

def upload_file_to_dsn(self, input_file, dataset_name, encoding=_ZOWE_FILES_DEFAULT_ENCODING):
"""Upload contents of a given file and uploads it to a dataset."""
if os.path.isfile(input_file):
with open(input_file, 'rb') as in_file:
response_json = self.write_to_dsn(dataset_name, in_file)
else:
raise FileNotFound(input_file)

A new contribution to the "main" branch would be welcome 🙂

@t1m0thyj t1m0thyj closed this May 31, 2023
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.

[zos-files] upload_file_to_dsn does not convert Windows line endings
3 participants