mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 14:15:55 -06:00
fix(api/libnvml): gracefully ignore UTF-8 decoding errors
This commit is contained in:
parent
4f46184441
commit
6bc8a8bf10
3 changed files with 3 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Fixed
|
||||
|
||||
-
|
||||
- Gracefully ignore UTF-8 decoding errors by [@XuehaiPan](https://github.com/XuehaiPan).
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
|||
|
|
@ -3146,7 +3146,7 @@ def _parse_cuda_visible_devices( # pylint: disable=too-many-branches,too-many-s
|
|||
),
|
||||
],
|
||||
)
|
||||
.decode('utf-8')
|
||||
.decode('utf-8', errors='replace')
|
||||
.strip()
|
||||
.split(',')
|
||||
)
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ def nvmlQuery(
|
|||
raise
|
||||
|
||||
if isinstance(retval, bytes):
|
||||
retval = retval.decode('utf-8')
|
||||
retval = retval.decode('utf-8', errors='replace')
|
||||
return retval
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue