Skip to content

Commit

Permalink
[as4630-54te] Fix LGTM alerts_1.
Browse files Browse the repository at this point in the history
  • Loading branch information
ec-michael-shih committed Feb 23, 2021
1 parent f23935c commit 1bfc9bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python

import os
import sys
from setuptools import setup
os.listdir

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
# ------------------------------------------------------------------

try:
import os
import sys
import getopt
import logging
import logging.config
import logging.handlers
import time
import commands
from as4630_54te.fanutil import FanUtil
from as4630_54te.thermalutil import ThermalUtil
except ImportError as e:
Expand Down Expand Up @@ -196,6 +196,8 @@ def manage_fans(self):
'Alarm-Critical for temperature critical is detected, reset DUT')
cmd_str = "i2cset -y -f 3 0x60 0x4 0xE4"
time.sleep(2)
return_value = os.system(cmd_str)
logging.warning('Fan set: i2cset -y -f 3 0x60 0x4 0xE4, status is %d', return_value)

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@


if DEBUG:
print 'ARGV :', sys.argv[1:]
print(sys.argv[0])
print('ARGV : %s' % sys.argv[1:])


def main():
Expand Down Expand Up @@ -363,8 +364,6 @@ def device_install():
def device_uninstall():
global FORCE

status, output = log_os_system("ls /sys/bus/i2c/devices/0-0070", 0)

for i in range(0, len(sfp_map)):
target = "/sys/bus/i2c/devices/i2c-" + \
str(sfp_map[i]) + "/delete_device"
Expand Down

0 comments on commit 1bfc9bc

Please sign in to comment.