-
Notifications
You must be signed in to change notification settings - Fork 812
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
[flare] add stderr of commands #1586
Conversation
choice = raw_input('Are you sure you want to continue [y/N]? ').lower() | ||
if choice not in ['yes', 'y']: | ||
choice = raw_input('Are you sure you want to continue [y/N]? ') | ||
if "".join(choice.lower().split()) not in ['yes', 'y']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of choice.strip().lower()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose this version for this 🔨 :
In [1]: ' y e s'.strip().lower()
Out[1]: 'y e s'
In [2]: ''.join(' y e s'.lower().split())
Out[2]: 'yes'
But I agree, it doesn't really make sense, I will change both of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say if someone typed y e s
he probably had one too many 🍻 and need to hold off sending his logs 😉
Also: - check if files are readable before trying to add them to the tarfile. - remove whitespaces from input before checking for yes/no.
When launching external commands that import other python modules they might affect our logging handlers and interfere with them. This resets them after the call and ensure we keep the same.
04039ec
to
1f3d519
Compare
Thanks for the review and the fix @LeoCavaille ! (tested and it works great) |
Travis ✅ |
Also:
tarfile.