FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 02-12-2009, 01:25 PM
Joel Granados
 
Default Removed partedUtils.get_flags(), functionality now in pyparted.

looks good
----- "David Cantrell" <dcantrell@redhat.com> wrote:

> This function was only used inside partedUtils.py, but it seemed
> reasonable to move it in to the new pyparted.
> ---
> partedUtils.py | 19 +------------------
> 1 files changed, 1 insertions(+), 18 deletions(-)
>
> diff --git a/partedUtils.py b/partedUtils.py
> index 0a109a4..1096e5f 100644
> --- a/partedUtils.py
> +++ b/partedUtils.py
> @@ -48,23 +48,6 @@ log = logging.getLogger("anaconda")
> import gettext
> _ = lambda x: gettext.ldgettext("anaconda", x)
>
> -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
> -
> def start_sector_to_cyl(device, sector):
> """Return the closest cylinder (round down) to sector on
> device."""
> return int(math.floor((float(sector)
> @@ -1307,7 +1290,7 @@ class DiskSet:
> device = get_partition_name(part)
> if part.fs_type:
> fs_type_name = part.fs_type.name
> - partFlags = get_flags (part)
> + partFlags = part.getFlags()
> rc = rc + ("%-9s %-12s %-12s %-10ld %-10ld %-10ld
> %7s
"
> % (device, part.type_name,
> fs_type_name,
> part.geom.start, part.geom.end,
> part.geom.length,
> --
> 1.6.1.3
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

--
Joel Andres Granados
Red Hat / Brno Czech Republic

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 05:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org