![](https://seccdn.libravatar.org/avatar/fd6eaa655db172f99e3101d3eedb482b.jpg?s=120&d=mm&r=g)
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@suse.de GPG public key available. -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org