truenas / py-SMART

Wrapper for smartctl (smartmontools)
GNU Lesser General Public License v2.1
76 stars 35 forks source link

all_selftests() outputs to stdout #17

Closed draik closed 5 years ago

draik commented 6 years ago

When calling dev.all_selftests(), the output is put into stdout, and cannot be assigned to variable, or put through format(). Suggesting to put print statement as return.

draik commented 6 years ago

Change "print(test)" to "return test"

https://github.com/freenas/py-SMART/blob/89ea65c7e756ad0c494e6397b26751cd43c9bcbf/pySMART/device.py#L374

william-gr commented 6 years ago

We have not been maintaining this library lately. If you are able to submit a PR we will gladly review and merge it though.

draik commented 6 years ago

Sweet! PR done.

ophilli commented 5 years ago

It looks like this issue was fixed in PR #18 and PR #19 . Is it possible to close this issue now?

draik commented 5 years ago

Looks good to me. Closed it.