def __init__(self, args, kwargs):
    if (len(args) != 1):
        raise InvalidArguments('Generator requires exactly one positional argument: the executable')
    exe = args[0]
    if hasattr(exe, 'held_object'):
        exe = exe.held_object
    if (not isinstance(exe, (Executable, dependencies.ExternalProgram))):
        raise InvalidArguments('First generator argument must be an executable.')
    self.exe = exe
    self.depfile = None
    self.capture = False
    self.process_kwargs(kwargs)
def __init__(self, args, kwargs):
    if (len(args) != 1):
        raise InvalidArguments('Generator requires exactly one positional argument: the executable')
    exe = args[0]
    if hasattr(exe, 'held_object'):
        exe = exe.held_object
    if (not isinstance(exe, (Executable, dependencies.ExternalProgram))):
        raise InvalidArguments('First generator argument must be an executable.')
    self.exe = exe
    self.depfile = None
    self.capture = False
    self.process_kwargs(kwargs)