def check_location(self, arch): if self._location_is_path: # We already mostly validated this return True # This will throw an error for us urlfetcher.detectMediaDistro(self.location, arch) return True
def check_location(self, guest): mediatype = self._get_media_type() if mediatype not in [MEDIA_CDROM_URL, MEDIA_LOCATION_URL]: return True # This will throw an error for us urlfetcher.detectMediaDistro(guest, self.location) return True
def detect_distro(self, guest): try: ret = urlfetcher.detectMediaDistro(guest, self.location) logging.debug("installer.detect_distro returned=%s", ret) return ret except: logging.exception("Error attempting to detect distro.") return None
def detect_distro(self, arch): try: return urlfetcher.detectMediaDistro(self.location, arch) except: logging.exception("Error attempting to detect distro.") return None