Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into syslog_telemetry_…
Browse files Browse the repository at this point in the history
…shared
  • Loading branch information
renukamanavalan committed Aug 8, 2022
2 parents a679910 + ae3f058 commit 654a3bd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
10 changes: 9 additions & 1 deletion platform/mellanox/mlnx-platform-api/sonic_platform/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import ctypes
import functools
import subprocess
import json
Expand Down Expand Up @@ -43,7 +44,14 @@ def read_from_file(file_path, target_type, default='', raise_exception=False, lo
"""
try:
with open(file_path, 'r') as f:
value = target_type(f.read().strip())
value = f.read()
if value is None:
# None return value is not allowed in any case, so we log error here for further debug.
logger.log_error('Failed to read from {}, value is None, errno is {}'.format(file_path, ctypes.get_errno()))
# Raise ValueError for the except statement to handle this as a normal exception
raise ValueError('File content of {} is None'.format(file_path))
else:
value = target_type(value.strip())
except (ValueError, IOError) as e:
if log_func:
log_func('Failed to read from file {} - {}'.format(file_path, repr(e)))
Expand Down
3 changes: 3 additions & 0 deletions platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN apt-get install -y net-tools \
libqt5core5a \
libqt5network5 \
libboost-program-options1.71.0 \
libboost-serialization1.71.0 \
libboost-system1.71.0 \
libboost-thread1.71.0 \
libgmp10 \
Expand All @@ -44,6 +45,8 @@ RUN apt-get install -y net-tools \
iptables \
jq \
libzmq5 \
libzmq3-dev \
uuid-dev \
# For installing Python m2crypto package
# (these can be uninstalled after installation)
build-essential \
Expand Down
1 change: 1 addition & 0 deletions src/thrift_0_14_1/thrift.patch/0002-cve-2017-1000487.patch
1 change: 1 addition & 0 deletions src/thrift_0_14_1/thrift.patch/series
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
0002-Fix-build-rules.patch
0003-Remove-minimist-packages.patch
0004-Remove-underscore-packages.patch
0002-cve-2017-1000487.patch
2 changes: 1 addition & 1 deletion src/wpasupplicant/sonic-wpa-supplicant

0 comments on commit 654a3bd

Please sign in to comment.