def _do_setup(self, data):
        # FIXME figure out why network-status doesn't work (get
        # nothing back from Tor it seems, although stem does get an
        # answer). this is a space-separated list of ~2500 OR id's;
        # could it be that LineReceiver can't handle it?
        added_magic = []
        for line in data.split('\n'):
            if line == "info/names=" or line.strip() == '':
                continue

            (name, documentation) = line.split(' ', 1)
            # FIXME think about this -- this is the only case where
            # there's something that's a directory
            # (i.e. MagicContainer) AND needs to be a ConfigMethod as
            # well...but doesn't really seem very useful. Somewhat
            # simpler to not support this case for now...
            if name == 'config/*':
                continue

            if name.endswith('/*'):
                # this takes an arg, so make a method
                bits = name[:-2].split('/')
                takes_arg = True

            else:
                bits = name.split('/')
                takes_arg = False

            mine = self
            for bit in bits[:-1]:
                bit = bit.replace('-', '_')
                if bit in mine.attrs:
                    mine = mine.attrs[bit]
                    if not isinstance(mine, MagicContainer):
                        raise RuntimeError(
                            "Already had something: %s for %s" % (bit, name)
                        )

                else:
                    c = MagicContainer(bit)
                    added_magic.append(c)
                    mine._add_attribute(bit, c)
                    mine = c
            n = bits[-1].replace('-', '_')
            if n in mine.attrs:
                raise RuntimeError(
                    "Already had something: %s for %s" % (n, name)
                )
            mine._add_attribute(n, ConfigMethod('/'.join(bits),
                                                self.protocol, takes_arg))

        for c in added_magic:
            c._setup_complete()
        return None
dataset/ETHPy150Open meejah/txtorcon/txtorcon/torinfo.py/TorInfo._do_setup/original