Skip to content

Commit 99afb49

Browse files
authored
Merge pull request #11 from poly000/patch-1
fix crash on unsupported laptop model
2 parents 82c726e + a9c1e84 commit 99afb49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def init_acpi_call(self):
9797
if self.is_dell_g15:
9898
print("Laptop model is supported.")
9999
else:
100-
choice = QMessageBox.question(self,"Unrecognized laptop","Laptop model is NOT supported. Try ACPI methods anyway? You might damage your hardware. Please do not do this if you don't know what you are doing!",QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No)
100+
choice = QMessageBox.question(self,"Unrecognized laptop","Laptop model is NOT supported. Try ACPI methods for G15 5525 anyway? You might damage your hardware. Please do not do this if you don't know what you are doing!",QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No)
101101
self.is_dell_g15 = (choice == QMessageBox.StandardButton.Yes) #User override
102102

103103
def checkLaptapModel(self):
@@ -109,6 +109,8 @@ def checkLaptapModel(self):
109109

110110
for (command, patch) in commands.values():
111111
self.acpi_cmd = command
112+
113+
self.is_dell_g15 = False
112114

113115
if (self.acpi_call("get_laptop_model") == "0x12c0"):
114116
self.is_dell_g15 = True

0 commit comments

Comments
 (0)