Return th HW platform information from the device.

def get_hw_platform(self, udi):
        """Return th HW platform information from the device."""
        platform = None
        try:
            pid = udi['pid']
            if pid == '':
                self.log("Empty PID. Use the hw family from the platform string.")
                return self.raw_family
            match = re.search(self.pid2platform_re, pid)
            if match:
                platform = match.group(1)
        except KeyError:
            pass
        return platform