From: Zbigniew Jędrzejewski-Szmek Date: Thu, 1 Dec 2016 22:23:53 +0000 (-0500) Subject: acpi-update.py: there is no "Error" class X-Git-Tag: v233~363^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=644d7e76104dc17241c5a50b4b006f6fa9bf052f;p=thirdparty%2Fsystemd.git 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. --- diff --git a/hwdb/acpi-update.py b/hwdb/acpi-update.py index 2dc8c7c064e..50da531dc65 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