コード例 #1
0
        def __init__(self, device, size, color, show_in_bar=True):
            self.device = device
            self.title = ''
            if device.startswith('/'):
                self.title = find_in_os_prober(device)
            if self.title:
                self.title = '%s (%s)' % (self.title, device)
            else:
                self.title = device
            self.set_size(size)
            self.color = color
            self.show_in_bar = show_in_bar

            self.layout_width = 0
            self.layout_height = 0
コード例 #2
0
        def __init__(self, device, size, color, show_in_bar=True):
            self.device = device
            self.title = ''
            if device.startswith('/'):
                self.title = find_in_os_prober(device)
            if self.title:
                self.title = '%s (%s)' % (self.title, device)
            else:
                self.title = device
            self.set_size(size)
            self.color = color
            self.show_in_bar = show_in_bar

            self.layout_width = 0
            self.layout_height = 0
コード例 #3
0
ファイル: PartitionBar.py プロジェクト: GalliumOS/ubiquity
    def __init__(self, path, size, fs, name=None):
        self.size = size
        self.fs = fs
        self.next = None
        self.index = None
        self.path = path

        if name is not None:
            self.name = name
            return

        if self.fs != 'linux-swap':
            # Do not go through find_in_os_prober() for swap: it returns
            # 'swap', which is not helpful since we show the filesystem anyway.
            # Better continue to the fallback of showing the partition name.
            name = find_in_os_prober(path)
        if not name:
            name = path.replace('/dev/', '')
        self.name = '%s (%s)' % (name, fs)
コード例 #4
0
    def __init__(self, path, size, fs, name=None):
        self.size = size
        self.fs = fs
        self.next = None
        self.index = None
        self.path = path

        if name is not None:
            self.name = name
            return

        if self.fs != 'linux-swap':
            # Do not go through find_in_os_prober() for swap: it returns
            # 'swap', which is not helpful since we show the filesystem anyway.
            # Better continue to the fallback of showing the partition name.
            name = find_in_os_prober(path)
        if not name:
            name = path.replace('/dev/', '')
        self.name = '%s (%s)' % (name, fs)
コード例 #5
0
ファイル: PartitionBar.py プロジェクト: queer1/ubiquity
def name_from_path(path):
    return find_in_os_prober(path) or path.replace('/dev/', '')
コード例 #6
0
ファイル: PartitionBar.py プロジェクト: 27Paolo/ubiquity
def name_from_path(path):
    return find_in_os_prober(path) or path.replace("/dev/", "")
コード例 #7
0
def name_from_path(path):
    return find_in_os_prober(path) or path.replace('/dev/', '')