# Buggy code
def ParseSignatureIdentifiers(self, data_location, signature_identifiers):
    """Parses the signature identifiers.

    Args:
      data_location: the location of the format specification file
                     (signatures.conf).
      signature_identifiers: a string with comma separated signature
                             identifiers.

    Raises:
      IOError: if the format specification file could not be read from
               the specified data location.
      ValueError: if no data location was specified.
    """
    if not signature_identifiers:
        return

    if not data_location:
        raise ValueError("Missing data location.")

    path = os.path.join(data_location, "signatures.conf")
    if not os.path.exists(path):
        raise IOError("No such format specification file: {0:s}".format(path))

    try:
        specification_store = self._ReadSpecificationFile(path)
    except IOError as exception:
        raise IOError(
            (
                "Unable to read format specification file: {0:s} with error: {1:s}"
            ).format(path, exception)
        )

    signature_identifiers = signature_identifiers.lower()
    signature_identifiers = [
        identifier.strip() for identifier in signature_identifiers.split(",")
    ]
    file_entry_filter = SignaturesFileEntryFilter(
        specification_store, signature_identifiers
    )
    self._filter_collection.AddFilter(file_entry_filter)


# Traceback (AttributeError)
./tools/image_export.py --help
Traceback (most recent call last):
File "./tools/image_export.py", line 312, in <module>
if not Main():
File "./tools/image_export.py", line 281, in Main
if not tool.ParseArguments():
File "./tools/image_export.py", line 94, in ParseArguments
self.AddDataOptions(argument_parser)
AttributeError: 'ImageExportTool' object has no attribute 'AddDataOptions'

# Fixed code
def ParseSignatureIdentifiers(self, data_location, signature_identifiers):
    """Parses the signature identifiers.

    Args:
      data_location: the location of the format specification file
                     (signatures.conf).
      signature_identifiers: a string with comma separated signature
                             identifiers.

    Raises:
      IOError: if the format specification file could not be read from
               the specified data location.
      ValueError: if no data location was specified.
    """
    if not signature_identifiers:
        return

    if not data_location:
        raise ValueError("Missing data location.")

    path = os.path.join(data_location, "signatures.conf")
    if not os.path.exists(path):
        raise IOError("No such format specification file: {0:s}".format(path))

    try:
        specification_store = self.ReadSpecificationFile(path)
    except IOError as exception:
        raise IOError(
            (
                "Unable to read format specification file: {0:s} with error: {1:s}"
            ).format(path, exception)
        )

    signature_identifiers = signature_identifiers.lower()
    signature_identifiers = [
        identifier.strip() for identifier in signature_identifiers.split(",")
    ]
    file_entry_filter = SignaturesFileEntryFilter(
        specification_store, signature_identifiers
    )
    self._filter_collection.AddFilter(file_entry_filter)