[blivet:master 6/8] Add a method to extract information about an mdraid array

Anne Mulhern amulhern at redhat.com
Wed Jul 16 17:09:14 UTC 2014


> 
> > +
> > +    # extract the UUID proper
> > +    the_uuid = re.match(r"(([a-f0-9]){8}:){3}([a-f0-9]){8}", info['UUID'])
> This regex should be compiled as a global constant of the module.
> 

The re module has some kind of internal cache for regular expressions.
I'ld rather let it do its thing than hoist that one re so far from its
one use.

> --
> Vratislav Podzimek
> 
> Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 


More information about the anaconda-patches mailing list