Skip to content

Commit

Permalink
Fix parsing issue in generate.py. Handle nissan special case
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonjchen authored Feb 29, 2024
1 parent dfa28ba commit bfd81e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ class CAR:
# Sometimes it's an object initializer,
# If so, use the first argument
elif isinstance(c.value, ast.Call):
cars.append(c.value.args[0].s)
if len(c.value.args) > 0 and isinstance(c.value.args[0], ast.Str):
cars.append(c.value.args[0].s)

# Log the cars
logging.info("Found %d cars in %s", len(cars), branch)
Expand Down

0 comments on commit bfd81e5

Please sign in to comment.