def get_flags_as_string (self, part):
    """Retrieve a list of strings representing the flags on the partition."""
    import parted
    strings=[]
    for flag in self._get_flags(part):
       strings.append(parted.partition_flag_get_name(flag))
    return strings
 def get_flags_as_string(self, part):
     """Retrieve a list of strings representing the flags on the partition."""
     import parted
     strings = []
     for flag in self.get_flags(part):
         strings.append(parted.partition_flag_get_name(flag))
     return strings
Beispiel #3
0
def get_flags (part):
    """Retrieve a list of strings representing the flags on the partition."""
    string=""
    if not part.is_active ():
        return string
    first=1
    flag = parted.partition_flag_next (0)
    while flag:
        if part.get_flag (flag):
            string = string + parted.partition_flag_get_name (flag)
            if first:
                first = 0
            else:
                string = string + ", "
        flag = parted.partition_flag_next (flag)
    return string