Uploaded image for project: 'TrueNAS'
  1. TrueNAS
  2. NAS-110039

Ignore encoding errors in stdout/stderr

    XMLWordPrintable

    Details

      Description

      PR: https://github.com/truenas/middleware/pull/6731

      When calling lsblk apparently disks can have non utf-8 data in at least labels and potentially more spots. By adding error=ignore to subprocess.run we can decode stdout earlier and toss junk data instead of causing exception on decoding it during json.loads later. Maybe needed in other spots in middlewared

        Attachments

          Attachments

            JEditor

              Activity

                People

                Assignee:
                releng Triage Team
                Reporter:
                bugclerk Bug Clerk
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: