Skip to content

Commit d7dd271

Browse files
author
Jostar Yang
committed
Fix LGTM alerts
1 parent 2564453 commit d7dd271

File tree

3 files changed

+3
-21
lines changed

3 files changed

+3
-21
lines changed

platform/broadcom/sonic-platform-modules-accton/as5835-54x/sonic_platform/watchdog.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
#############################################################################
88

99
try:
10-
import os
11-
import sys
1210
from sonic_platform_pddf_base.pddf_watchdog import PddfWatchdog
1311
except ImportError as e:
1412
raise ImportError(str(e) + "- required module not found")

platform/broadcom/sonic-platform-modules-accton/as5835-54x/utils/accton_as5835_54x_pddf_monitor.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (C) 2019 Accton Technology Corporation
44
#
@@ -23,16 +23,10 @@
2323
# ------------------------------------------------------------------
2424

2525
try:
26-
import os
2726
import sys, getopt
28-
import subprocess
29-
import click
30-
import imp
3127
import logging
3228
import logging.config
33-
import types
34-
import time # this is only being used as part of the example
35-
import traceback
29+
import time
3630
import signal
3731
from tabulate import tabulate
3832
from sonic_platform import platform
@@ -44,8 +38,6 @@
4438
FUNCTION_NAME = 'accton_as5835_54x_monitor'
4539
DUTY_MAX = 100
4640

47-
global log_file
48-
global log_level
4941
platform_chassis = None
5042

5143
test_temp = 0
@@ -88,7 +80,6 @@ def manage_fans(self):
8880

8981
THERMAL_NUM_MAX=4
9082
FAN_LEV1_UP_TEMP = 57700 # temperature
91-
FAN_LEV1_DOWN_TEMP = 0 # unused
9283
FAN_LEV1_SPEED_PERC = DUTY_MAX # percentage*/
9384

9485
FAN_LEV2_UP_TEMP = 53000
@@ -99,27 +90,22 @@ def manage_fans(self):
9990
FAN_LEV3_DOWN_TEMP = 47700
10091
FAN_LEV3_SPEED_PERC = 65
10192

102-
FAN_LEV4_UP_TEMP = 0 # unused
10393
FAN_LEV4_DOWN_TEMP = 42700
10494
FAN_LEV4_SPEED_PERC = 40
10595

10696
FAN_NUM=2
10797
FAN_TRAY_NUM=5
108-
109-
#thermal = ThermalUtil()
110-
#fan = FanUtil()
98+
11199
if test_temp_revert==0:
112100
temp_test_data=temp_test_data+2000
113101
else:
114102
temp_test_data=temp_test_data-2000
115103

116104
if test_temp==0:
117-
#temp2 = thermal.get_thermal_2_val()
118105
temp2=platform_chassis.get_thermal(1).get_temperature()*1000
119106
if temp2 is None:
120107
return False
121108

122-
#temp3 = thermal.get_thermal_3_val()
123109
temp3=platform_chassis.get_thermal(2).get_temperature()*1000
124110
if temp3 is None:
125111
return False

platform/broadcom/sonic-platform-modules-accton/as5835-54x/utils/pddf_switch_svc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/usr/bin/env python
22
# Script to stop and start the respective platforms default services.
33
# This will be used while switching the pddf->non-pddf mode and vice versa
4-
import os
5-
import sys
64
import commands
75

86
def check_pddf_support():

0 commit comments

Comments
 (0)