예제 #1
0
def openFileURL(url):
    filePath = url[7:]

    if filePath.startswith(consts.MEDIA_DEVICE_MOUNT_POINT):
        import media  # Import here to avoid a loop.
        media.runtimeActionMountMedia()

    if not filePath.startswith('/'):
        log.warn('Do not support hosts specified in file:// URLs')
        log.warn('Assuming the user meant to put in a third /')
        filePath = '/' + filePath
    try:
        return open(filePath)
    except IOError, ex:
        log.error('File %s specified in URL %s could not be opened (%s)' %
                  (filePath, url, str(ex)))
        raise
예제 #2
0
def openFileURL(url):
    filePath = url[7:]

    if filePath.startswith(consts.MEDIA_DEVICE_MOUNT_POINT):
        import media # Import here to avoid a loop.
        media.runtimeActionMountMedia()
    
    if not filePath.startswith('/'):
        log.warn('Do not support hosts specified in file:// URLs')
        log.warn('Assuming the user meant to put in a third /')
        filePath = '/' + filePath
    try:
        return open(filePath)
    except IOError, ex:
        log.error('File %s specified in URL %s could not be opened (%s)'
                  % (filePath, url, str(ex)))
        raise
예제 #3
0
def _sourceOption(match):
    '''Handle the "source=<path>" option.'''
    path = match.group(1)

    # If the CD is in a drive that is only detected after all the drivers are
    # loaded then we need to rerun the script that finds the install CD.
    if not os.path.exists(path):
        media.runtimeActionMountMedia()
    if not os.path.exists(path):
        failWithLog("error: cannot find source -- %s\n" % path)

    if path == CDROM_DEVICE_PATH:
        pass
    else:
        userchoices.setMediaDescriptor(media.MediaDescriptor(
                partPath=path, partFsName="iso9660"))
    
    return []
예제 #4
0
파일: review_gui.py 프로젝트: vmware/weasel
 def getNext(self):
     # Make sure the media is mounted before the user leaves the machine
     # unattended for the actual install.
     media.runtimeActionMountMedia()
예제 #5
0
 def getNext(self):
     # Make sure the media is mounted before the user leaves the machine
     # unattended for the actual install.
     media.runtimeActionMountMedia()
예제 #6
0
파일: review_ui.py 프로젝트: vmware/weasel
    def checkMedia(self):
        # Make sure the media is mounted before the user leaves the machine
        # unattended for the actual install.
        media.runtimeActionMountMedia()

        self.setSubstepEnv( {'next': self.stepForward } )
예제 #7
0
    def checkMedia(self):
        # Make sure the media is mounted before the user leaves the machine
        # unattended for the actual install.
        media.runtimeActionMountMedia()

        self.setSubstepEnv({'next': self.stepForward})