def is_system_rpm(self):
        """Check if the RPM is system RPM."""
        sys_rpm_paths = [
            '/usr/bin/rpm',
            # On CentOS6, system RPM is installed in this directory.
            '/bin/rpm',
        ]
        matched = False
        for sys_rpm_path in sys_rpm_paths:
            if self.rpm_path.startswith(sys_rpm_path):
                matched = True
                break
        return matched
def is_system_rpm ( self ) : sys_rpm_paths = [ '/usr/bin/rpm' , '/bin/rpm' , ] matched = False for sys_rpm_path in sys_rpm_paths : if self . rpm_path . startswith ( sys_rpm_path ) : matched = True break return matched
Check if the RPM is system RPM.