'Get instance of builder class based on flags.'

def GetBuilder(self, context):

    try:
        if ('Target:Darwin' in context):
            builder_class = builders.DarwinClientBuilder
        elif ('Target:Windows' in context):
            builder_class = builders.WindowsClientBuilder
        elif ('Target:LinuxDeb' in context):
            builder_class = builders.LinuxClientBuilder
        elif ('Target:LinuxRpm' in context):
            builder_class = builders.CentosClientBuilder
        else:
            parser.error(('Bad    build    context:    %s' % context))
    except AttributeError:
        raise RuntimeError(('Unable    to    build    for    platform    %s    when    running    on    current    platform.' % self.platform))
    return builder_class(context=context)
