diff options
| author | Daniil Baturin <daniil@vyos.io> | 2025-04-29 15:24:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-29 15:24:43 +0100 |
| commit | 64849ac111bba3f0a453b3670964149811492e1b (patch) | |
| tree | d3b6c54970bbef14762943f6cb6d387ccf3774fd /src | |
| parent | ce74e456b6708c879d7aeaacdf763cec2809aa6b (diff) | |
| parent | 30a39bf0a95b1d36a5c082e92cb6f12d73b268fd (diff) | |
| download | vyos-1x-64849ac111bba3f0a453b3670964149811492e1b.tar.gz vyos-1x-64849ac111bba3f0a453b3670964149811492e1b.zip | |
Merge pull request #4479 from dmbaturin/T7410-tech-support-usb
tech-support: T7410: handle possible errors when executing lsusb
Diffstat (limited to 'src')
| -rw-r--r-- | src/op_mode/tech_support.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/op_mode/tech_support.py b/src/op_mode/tech_support.py index 24ac0af1b..c4496dfa3 100644 --- a/src/op_mode/tech_support.py +++ b/src/op_mode/tech_support.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2024 VyOS maintainers and contributors +# Copyright (C) 2025 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -20,6 +20,7 @@ import json import vyos.opmode from vyos.utils.process import cmd +from vyos.base import Warning def _get_version_data(): from vyos.version import get_version_data @@ -51,7 +52,12 @@ def _get_storage(): def _get_devices(): devices = {} devices["pci"] = cmd("lspci") - devices["usb"] = cmd("lsusb") + + try: + devices["usb"] = cmd("lsusb") + except OSError: + Warning("Could not retrieve information about USB devices") + devices["usb"] = {} return devices |
