From 644d7e76104dc17241c5a50b4b006f6fa9bf052f Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Thu, 1 Dec 2016 17:23:53 -0500 Subject: acpi-update.py: there is no "Error" class Evidently this code path was never hit, because we'd crash with NameError. The exception message also seems bogus. So just replace the whole thing with the standard exception for invalid input. --- hwdb/acpi-update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hwdb') diff --git a/hwdb/acpi-update.py b/hwdb/acpi-update.py index 2dc8c7c064..50da531dc6 100755 --- a/hwdb/acpi-update.py +++ b/hwdb/acpi-update.py @@ -31,7 +31,7 @@ class PNPTableParser(HTMLParser): elif self.state == State.AFTER_PNPID: self.state = State.DATE else: - raise Error("Unexpected field") + raise ValueError self.data = "" @@ -48,7 +48,7 @@ class PNPTableParser(HTMLParser): elif self.state == State.DATE: self.state = State.NOWHERE else: - raise Error("Unexpected field") + raise ValueError def handle_data(self, data): self.data += data -- cgit v1.2.3-54-g00ecf