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

Should newline char be removed #16

Closed
cperiz opened this issue May 18, 2022 · 1 comment
Closed

Should newline char be removed #16

cperiz opened this issue May 18, 2022 · 1 comment

Comments

@cperiz
Copy link

cperiz commented May 18, 2022

Hi, So I notice that this read here adds a \n char to the end of the query. This then causes an issue with the count if its not actually an end-of-line. Should there be a .strip() added here?

arr = open(args.query_file,"rb").read().strip()

Thanks.

@carlini
Copy link
Collaborator

carlini commented May 18, 2022

This python command doesn't itself add a newline to the file. It only reads what's already in the file. If you don't want a newline then you should remove it from the input file. For example, if you're writing to it with echo, this by default adds a newline to the end.

@carlini carlini closed this as completed May 18, 2022
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

No branches or pull requests

2 participants