mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 19:11:54 +08:00
minor 3.7 fixes
This commit is contained in:
@@ -258,18 +258,20 @@ class UserGpio:
|
||||
"type": "label",
|
||||
"text": item[1:].strip(),
|
||||
})
|
||||
elif (parts := list(map(str.strip, item.split(",", 1)))):
|
||||
if parts[0] in self.__inputs:
|
||||
items.append({
|
||||
"type": "input",
|
||||
"channel": parts[0],
|
||||
})
|
||||
elif parts[0] in self.__outputs:
|
||||
items.append({
|
||||
"type": "output",
|
||||
"channel": parts[0],
|
||||
"text": (parts[1] if len(parts) > 1 else "Click"),
|
||||
})
|
||||
else:
|
||||
parts = list(map(str.strip, item.split(",", 1)))
|
||||
if parts:
|
||||
if parts[0] in self.__inputs:
|
||||
items.append({
|
||||
"type": "input",
|
||||
"channel": parts[0],
|
||||
})
|
||||
elif parts[0] in self.__outputs:
|
||||
items.append({
|
||||
"type": "output",
|
||||
"channel": parts[0],
|
||||
"text": (parts[1] if len(parts) > 1 else "Click"),
|
||||
})
|
||||
table.append(items)
|
||||
return {
|
||||
"header": self.__view["header"],
|
||||
|
||||
Reference in New Issue
Block a user