scanner: convert the 'version' and 'since' arguments to int

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/328>
This commit is contained in:
Peter Hutterer 2025-03-31 09:54:02 +10:00
parent fa21d765a1
commit b0deafc641

View file

@ -520,7 +520,7 @@ class ProtocolParser(xml.sax.handler.ContentHandler):
try:
name = attrs["name"]
version = attrs["version"]
version = int(attrs["version"])
except KeyError as e:
raise XmlError.create(
f"Missing attribute {e} in element '{element}'",
@ -559,7 +559,7 @@ class ProtocolParser(xml.sax.handler.ContentHandler):
)
try:
name = attrs["name"]
since = attrs["since"]
since = int(attrs["since"])
except KeyError as e:
raise XmlError.create(
f"Missing attribute {e} in element '{element}'",
@ -612,7 +612,7 @@ class ProtocolParser(xml.sax.handler.ContentHandler):
try:
name = attrs["name"]
since = attrs["since"]
since = int(attrs["since"])
except KeyError as e:
raise XmlError.create(
f"Missing attribute {e} in element '{element}'",
@ -646,7 +646,7 @@ class ProtocolParser(xml.sax.handler.ContentHandler):
)
try:
name = attrs["name"]
since = attrs["since"]
since = int(attrs["since"])
except KeyError as e:
raise XmlError.create(
f"Missing attribute {e} in element '{element}'",