Skip to content

Commit

Permalink
Linterによる修正
Browse files Browse the repository at this point in the history
  • Loading branch information
helenwangjia committed Jun 7, 2024
1 parent 61d2ddd commit cdf8dad
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,18 @@ def handle(self, *args, **options):
try:
if IS_CLOSED_NETWORK:
# コア網チェック
with serial.Serial('/dev/ttyUSB1', baudrate=115200, timeout=1) as sara:
sara.write(b'at\r\n')
b=sara.read(16)
cnum=b.decode().split("\n")
with serial.Serial("/dev/ttyUSB1", baudrate=115200, timeout=1) as sara:
sara.write(b"at\r\n")
b = sara.read(16)
cnum = b.decode().split("\n")

if "OK\r" in cnum:
# ログ送信
send_server(tar_list)
else:
logger.error("can not send compressed file. Unable to connect to closed network. ")
logger.error(
"can not send compressed file. Unable to connect to closed network. "
)
else:
# ログ送信
send_server(tar_list)
Expand Down

0 comments on commit cdf8dad

Please sign in to comment.