def __init__(self, details):
        if 'ip' in details:
            self.ip = details['ip']

            for attr in config.OPTION_ATTRS[:-1]:
                if attr[:-1] in details:
                    setattr(self, attr[:-1], details[attr[:-1]])
                else:
                    setattr(self, attr[:-1], '')
        else:
            device_detail = ''
            for attr in config.OPTION_ATTRS[:-1]:
                if attr[:-1] in details:
                    device_detail += attr[:-1] + ' : ' + details[attr[:-1]]
                    device_detail += ', '
            print("'%s' does not have an ip, skipping" % device_detail)
dataset/ETHPy150Open facebook/fbpush/fbpush/main.py/Device.__init__/original