Commit 502291e4 authored by David Bokan's avatar David Bokan Committed by Commit Bot

Fix type error class_methods.py

This line currently causes my gdb sessions to error out with:

  TypeError: unorderable types: list() > int()

Looks like this just wants to check for an empty list

Bug: None
Change-Id: I5de214c2373045a320e83db229b2ae449b78c967
Reviewed-on: https://chromium-review.googlesource.com/c/1352645Reviewed-by: default avatarRobert Flack <flackr@chromium.org>
Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611488}
parent e68f903d
......@@ -88,7 +88,7 @@ def Class(class_name, template_types):
# Constructs a regular expression to match this type.
self._class_regex = re.compile(
'^' + re.escape(class_name) +
('<.*>' if template_types > 0 else '') + '$')
('<.*>' if len(template_types) > 0 else '') + '$')
# Construct a dictionary and array of methods
self.dict = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment