def check_location(self):
     if self._location_is_path:
         # We already mostly validated this
         return True
     else:
         # This will throw an error for us
         OSDistro.detectMediaDistro(location=self.location, arch=self.arch)
     return True
 def check_location(self):
     if self._location_is_path:
         # We already mostly validated this
         return True
     else:
         # This will throw an error for us
         OSDistro.detectMediaDistro(location=self.location, arch=self.arch)
     return True
    def detect_distro(self):
        try:
            dist_info = OSDistro.detectMediaDistro(location=self.location, arch=self.arch)
        except:
            logging.exception("Error attempting to detect distro.")
            return (None, None)

        # detectMediaDistro should only return valid values
        dtype, dvariant = dist_info
        return (dtype, dvariant)
    def detect_distro(self):
        try:
            dist_info = OSDistro.detectMediaDistro(location=self.location,
                                                   arch=self.arch)
        except:
            logging.exception("Error attempting to detect distro.")
            return (None, None)

        # detectMediaDistro should only return valid values
        dtype, dvariant = dist_info
        return (dtype, dvariant)