キーボード、マウスのボタンが呼び出せないバグを修正

This commit is contained in:
suti7yk5032 2024-09-29 00:24:15 +09:00
parent c82351e186
commit dfb21e3a25

View file

@ -833,7 +833,7 @@ class DL():
keyboard_list = cursor.fetchall() keyboard_list = cursor.fetchall()
keyboard_list_base = {} keyboard_list_base = {}
for i in keyboard_list: for i in keyboard_list:
if i['keyboard_number'] == 0: if i[0] == 0:
pass pass
else: else:
keyboard_list_base[i[0]] = {"keyboard_number": i[0], "using_member_id": i[1], "device_instance_path": i[2], "device_name": i[3], "detail": i[4], "alt_name": i[5]} keyboard_list_base[i[0]] = {"keyboard_number": i[0], "using_member_id": i[1], "device_instance_path": i[2], "device_name": i[3], "detail": i[4], "alt_name": i[5]}
@ -841,7 +841,7 @@ class DL():
return {"result": 0, "about": "ok", "output_dict": keyboard_list_base} return {"result": 0, "about": "ok", "output_dict": keyboard_list_base}
except Exception as error: except Exception as error:
self.log(title=f"[ERROR] PCリストの取得中にエラーが発生しました。 {str(error.__class__.__name__)}", message=str(error.args), flag=1) self.log(title=f"[ERROR] キーボードリストの取得中にエラーが発生しました。 {str(error.__class__.__name__)}", message=str(error.args), flag=1)
return {"result": 1, "about": "error", "output_dict": {"error_class_name": str(error.__class__.__name__), "error_args": str(error.args)}} return {"result": 1, "about": "error", "output_dict": {"error_class_name": str(error.__class__.__name__), "error_args": str(error.args)}}
finally: finally:
@ -863,7 +863,7 @@ class DL():
mouse_list = cursor.fetchall() mouse_list = cursor.fetchall()
mouse_list_base = {} mouse_list_base = {}
for i in mouse_list: for i in mouse_list:
if i['mouse_number'] == 0: if i[0] == 0:
pass pass
else: else:
mouse_list_base[i[0]] = {"keyboard_number": i[0], "using_member_id": i[1], "device_instance_path": i[2], "device_name": i[3], "detail": i[4], "alt_name": i[5]} mouse_list_base[i[0]] = {"keyboard_number": i[0], "using_member_id": i[1], "device_instance_path": i[2], "device_name": i[3], "detail": i[4], "alt_name": i[5]}
@ -871,7 +871,7 @@ class DL():
return {"result": 0, "about": "ok", "output_dict": mouse_list_base} return {"result": 0, "about": "ok", "output_dict": mouse_list_base}
except Exception as error: except Exception as error:
self.log(title=f"[ERROR] PCリストの取得中にエラーが発生しました。 {str(error.__class__.__name__)}", message=str(error.args), flag=1) self.log(title=f"[ERROR] マウスリストの取得中にエラーが発生しました。 {str(error.__class__.__name__)}", message=str(error.args), flag=1)
return {"result": 1, "about": "error", "output_dict": {"error_class_name": str(error.__class__.__name__), "error_args": str(error.args)}} return {"result": 1, "about": "error", "output_dict": {"error_class_name": str(error.__class__.__name__), "error_args": str(error.args)}}
finally: finally: