Hello! I have this model

class IP(SQLObject):

    address = StringCol(alternateID=True, length=14)
    hostname = StringCol(length=50)

    def _set_address(self, address):
        try:
            hostname = gethostbyaddr(address)[0]
        except herror:
            hostname = ''

        self._set_hostname(hostname)
        self._SO_set_address(address)

Sadly, this won't work in CatWalk -- the hostname attribute will not
get the hostname (instead it will be blank). However, if I add the
following in my model

    def _set_hostname(self, hostname):
        self._SO_set_hostname(hostname)

Then it works like a charm. Is this the proper way to do this? I would
expect that by merely calling self._set_hostname, the whole thing would
work.

Thanks in advance.

Reply via email to