Mailinglist Archive: yast-devel (57 mails)

< Previous Next >
Re: [yast-devel] Re: [yast-commit] r65294 - in /trunk/storage: package/ storage/src/include/ storage/src/modules/
On Wed, Aug 10, Josef Reidinger wrote:


yast2-core from 2.17.16 has nice feature to return unchanged list if key not
exist
so instead
if( haskey( p, "create" ))
p = remove( p, "create" );
}

you can write just
p = remove( p, "create" );

Thanks, will change this...
I always hated the old behavior of remove...

- else if( size(filter( map p, new["subvol"]:[],
``(p["name"]:""==pth)))>0 )
+ else if( size(filter( string s, SubvolNames( new ), ``(s==pth)))>0 )

for me this looks like you want check if it contains element
so:
else if ( contains( SubvolNames( new ), pth )

Indeed, did not think about contains when changing the code...

Tschuess,
Thomas Fehr
--
Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: fehr@xxxxxxx
GPG public key available.
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
References