def pic(self): pic_data = redis.printer_pic_get(self.id) return dict_or_none(pic_data)
def pic(self): pic_data = redis.printer_pic_get(self.id) if 'p' in pic_data: pic_data['p'] = float(pic_data['p']) return dict_or_none(pic_data)