def list_cmd(): """ List available collections and mock configs. """ click.echo() click.echo('Available software collections: {}'.format(':'.join(get_build_order()))) click.echo('Available mock configs: {}'.format(':'.join(get_mock_configs())))
def list_cmd(): """ List available collections and mock configs. """ click.echo() click.echo('Available software collections: {}'.format(':'.join( get_build_order()))) click.echo('Available mock configs: {}'.format(':'.join( get_mock_configs())))
def convert(self, value, param, ctx): expected_scl = get_build_order() expected_scl.append('all') actual_scl = value.split(':') if 'all' in actual_scl: actual_scl = list(set(expected_scl) - set(actual_scl)) if set(actual_scl) - set(expected_scl): self.fail(u'You must choose from following options: {0}.'.format(expected_scl)) if not actual_scl: self.fail(u'¯\_(ツ)_/¯ You\'ve tried to be too smart and you end up with nothing to build.') return actual_scl
def convert(self, value, param, ctx): expected_scl = get_build_order() expected_scl.append('all') actual_scl = value.split(':') if 'all' in actual_scl: actual_scl = list(set(expected_scl) - set(actual_scl)) if set(actual_scl) - set(expected_scl): self.fail(u'You must choose from following options: {0}.'.format( expected_scl)) if not actual_scl: self.fail( u'¯\_(ツ)_/¯ You\'ve tried to be too smart and you end up with nothing to build.' ) return actual_scl