Skip to content

Commit 1bfc9bc

Browse files
[as4630-54te] Fix LGTM alerts_1.
1 parent f23935c commit 1bfc9bc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

platform/broadcom/sonic-platform-modules-accton/as4630-54te/setup.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python
22

33
import os
4-
import sys
54
from setuptools import setup
65
os.listdir
76

platform/broadcom/sonic-platform-modules-accton/as4630-54te/utils/accton_as4630_54te_monitor.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
# ------------------------------------------------------------------
2121

2222
try:
23+
import os
2324
import sys
2425
import getopt
2526
import logging
2627
import logging.config
2728
import logging.handlers
2829
import time
29-
import commands
3030
from as4630_54te.fanutil import FanUtil
3131
from as4630_54te.thermalutil import ThermalUtil
3232
except ImportError as e:
@@ -196,6 +196,8 @@ def manage_fans(self):
196196
'Alarm-Critical for temperature critical is detected, reset DUT')
197197
cmd_str = "i2cset -y -f 3 0x60 0x4 0xE4"
198198
time.sleep(2)
199+
return_value = os.system(cmd_str)
200+
logging.warning('Fan set: i2cset -y -f 3 0x60 0x4 0xE4, status is %d', return_value)
199201

200202
#logging.debug('ori_state=%d, current_state=%d, temp_val=%d\n\n',ori_state, fan_policy_state, temp_val)
201203

platform/broadcom/sonic-platform-modules-accton/as4630-54te/utils/accton_as4630_54te_util.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@
160160

161161

162162
if DEBUG:
163-
print 'ARGV :', sys.argv[1:]
163+
print(sys.argv[0])
164+
print('ARGV : %s' % sys.argv[1:])
164165

165166

166167
def main():
@@ -363,8 +364,6 @@ def device_install():
363364
def device_uninstall():
364365
global FORCE
365366

366-
status, output = log_os_system("ls /sys/bus/i2c/devices/0-0070", 0)
367-
368367
for i in range(0, len(sfp_map)):
369368
target = "/sys/bus/i2c/devices/i2c-" + \
370369
str(sfp_map[i]) + "/delete_device"

0 commit comments

Comments
 (0)