See the following code
|
def _handle_attribute(self): |
|
"""Cares about the correct handling of autobazel-attributes""" |
|
attribute_path = self.arguments[0] |
|
|
|
try: |
|
package_name, target_name, rule_name, attribute_name = attribute_path.rsplit(':', 3) |
|
except (IndexError, ValueError): |
|
self.log.warning("bazel-path for autobazel-attribute looks strange: {}".format(attribute_path)) |
|
|
|
if target_name.startswith('/'): |
If the except clause is hit, target_name is not set and therefore the startswith check will error.
See the following code
sphinx-bazel/sphinxcontrib/sphinx_bazel/autobazel/common.py
Lines 537 to 546 in 6a39e46
If the
exceptclause is hit,target_nameis not set and therefore thestartswithcheck will error.