def _extract_bytes(self, details): # Replace it with the byte amount real_size = self.SIZE_RE.search(details) if real_size: details = real_size.group(1) try: details = strutils.to_bytes(details) except TypeError: pass return details