Skip to content

Commit

Permalink
VSI Sensor: Add try/except to the import section (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
TeoMahnic authored Mar 18, 2024
1 parent 62c585c commit bc1643e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions ARM.SDS.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<releases>
<release version="0.0.0">
Active Development ...
VSI Sensor:
- Add try/except to the import section
</release>
</releases>

Expand Down
16 changes: 11 additions & 5 deletions examples/framework/interface/VSI/sensor/python/vsi_sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022 Arm Limited. All rights reserved.
# Copyright (c) 2022-2024 Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -16,10 +16,16 @@

# Python VSI sensor module


import logging
from os import path
from struct import unpack
try:
import logging
from os import path
from struct import unpack
except ImportError as err:
print(f"VSI:Sensor:ImportError: {err}")
raise
except Exception as e:
print(f"VSI:Sensor:Exception: {type(e).__name__}")
raise


class RecordManager:
Expand Down

0 comments on commit bc1643e

Please sign in to comment.