def run(self, options, args):
        tribbles = ['xyork', 'slorg', 'rooster', 'blinky', 'poorboy', 'willy']

        found = False
        for x in tribbles:
            if options.name is not None:
                if options.name.lower() in x:
                    found = True
                    print x
            else:
                print x

        if not found and options.name is not None:
            # TODO: make this an exception subclass
            sys.stderr.write("error: tribble (%s) not found" % options['name'])
            return 1
        return 0
dataset/ETHPy150Open mpdehaan/interfacer/example_modules/tribbles.py/ListCommand.run/original