[PATCH 4/9] Add type-specific methods for member set management.

Vratislav Podzimek vpodzime at redhat.com
Fri Mar 21 07:42:57 UTC 2014


> +    def memberStatus(self, member):
> +        if not (self.status and member.status):
> +            return
> +
> +        member_name = os.path.basename(member.sysfsPath)
> +        path = "/sys/%s/md/dev-%s/state" % (self.sysfsPath, member_name)
> +        try:
> +            state = open(path).read().strip()
> +        except IOError:
> +            state = None
> +
> +        return state
I think this is a good candidate for another function in
devicelibs/mdraid.py.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list