Example #1
0
def _check_path(path):
    ''' Raise an :py:class:`qubes.storage.StoragePoolException` if ``path`` does
        not exist.
    '''
    if not os.path.exists(path):
        raise StoragePoolException('Missing file: %s' % path)
Example #2
0
 def import_volume(self, src_volume):
     if isinstance(src_volume, LinuxModules):
         # do nothing
         return self
     raise StoragePoolException('clone of LinuxModules volume from '
                                'different volume type is not supported')
Example #3
0
    def start(self):
        path = self.path
        if path and not os.path.exists(path):
            raise StoragePoolException('Missing kernel modules: %s' % path)

        return self