-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
[DISK] Fixes df
output parsing when FS column contains whitespaces
#102
Conversation
Hey, thanks for opening this up. Thanks, bye 👋 |
So it looks like it didn't like whitespace in the Volume name under the "Filesystem" column of df's output ( |
Indeed, the parsing is currently very naive, as based on whitespaces. It worked well on *NIX and derivatives as the filesystem column was not supposed to contain any whitespace. I'll try to fix this without aiming for proper Windows support (as originally planned), as you are already concerned on macOS. |
ea48ecd
to
7e7a6a4
Compare
df
output parsing when FS column contains whitespaces
@lourinaldi please check the updated patch and tell me whether it suits you. |
use the float() method to avoid invalid literal for int() with base 10
Description
The Python ValueError: invalid literal for int() with base 10 error is raised when you try to convert a string value that is not formatted as an integer.
To solve this problem, you can use the float() method to convert a floating-point number in a string to an integer. Then, you can use int() to convert your number to an integer.
Reason and / or context
How has this been tested ?
Python 3.9.7 on MacOS 11.6
Types of changes :
Checklist :