super().__init__(*args, **kwargs)
self.is_internal_only = self.get_options().internal_only
self.is_external_only = self.get_options().external_only
if self.is_internal_only and self.is_external_only:
raise TaskError("At most one of --internal-only or --external-only can be selected.")
def console_output(self, unused_method_argument):
After Change
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
opts = self.get_options()
type_configured = not opts.is_default("type")
if type_configured:
self.dependency_type = opts.type
return
else:
if opts.internal_only and opts.external_only:
raise TaskError("At most one of --internal-only or --external-only can be selected.")
if opts.internal_only:
self.dependency_type = DependencyType.SOURCE
elif opts.external_only:
self.dependency_type = DependencyType.THIRD_PARTY
else:
self.dependency_type = DependencyType.SOURCE_AND_THIRD_PARTY