예제 #1
0
    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
예제 #2
0
    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
예제 #3
0
 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
예제 #4
0
 def detect_distro(self, arch):
     try:
         return urlfetcher.detectMediaDistro(self.location, arch)
     except:
         logging.exception("Error attempting to detect distro.")
         return None