Skip to content

Commit 592eb79

Browse files
committed
Getting there...
1 parent d5a6cae commit 592eb79

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

aspSUB20.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def spiCountBoards(sub20Mapper, maxRetry=MAX_SPI_RETRY, waitRetry=WAIT_SPI_RETRY
110110
if attempt != 0:
111111
time.sleep(waitRetry)
112112

113-
p = subprocess.Popen(['/usr/local/bin/countBoards', str(sub20SN),
113+
p = subprocess.Popen(['/usr/local/bin/countBoards', str(sub20SN)],
114114
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
115115
text=True)
116116
output, output2 = p.communicate()
@@ -311,7 +311,7 @@ def psuRead(sub20SN, psuAddress, maxRetry=MAX_I2C_RETRY, waitRetry=WAIT_I2C_RETR
311311
time.sleep(waitRetry)
312312

313313
try:
314-
p = subprocess.Popen(['/usr/local/bin/readPSU', str(sub20SN), '0x%02X' % deviceAddress],
314+
p = subprocess.Popen(['/usr/local/bin/readPSU', str(sub20SN), '0x%02X' % psuAddress],
315315
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
316316
text=True)
317317
output, output2 = p.communicate()
@@ -320,12 +320,12 @@ def psuRead(sub20SN, psuAddress, maxRetry=MAX_I2C_RETRY, waitRetry=WAIT_I2C_RETR
320320
psu, desc, onoffHuh, statusHuh, voltageV, currentA, = output.replace('\n', '').split(None, 5)
321321
data = {'address': psu,
322322
'description': desc,
323-
'voltage': float(voltageV)
324-
'current': float(currentA)
325-
'onoff': '%-3s' % onoffHuh
323+
'voltage': float(voltageV),
324+
'current': float(currentA),
325+
'onoff': '%-3s' % onoffHuh,
326326
'status': statusHuh
327327
}
328-
break;
328+
break
329329
else:
330330
aspSUB20Logger.warning("%s: SUB-20 S/N %s command %i of %i returned %i; '%s;%s'", inspect.stack()[0][3], sub20SN, attempt, maxRetry, p.returncode, output, output2)
331331

0 commit comments

Comments
 (0)