Revision 403f5172 lib/bdev.py

b/lib/bdev.py
389 389
    pvs_info.reverse()
390 390

  
391 391
    pvlist = [ pv[1] for pv in pvs_info ]
392
    if compat.any(pvlist, lambda v: ":" in v):
392
    if compat.any(":" in v for v in pvlist):
393 393
      _ThrowError("Some of your PVs have the invalid character ':' in their"
394 394
                  " name, this is not supported - please filter them out"
395 395
                  " in lvm.conf using either 'filter' or 'preferred_names'")
......
463 463
    """
464 464
    if (not cls._VALID_NAME_RE.match(name) or
465 465
        name in cls._INVALID_NAMES or
466
        compat.any(cls._INVALID_SUBSTRINGS, lambda x: x in name)):
466
        compat.any(substring in name for substring in cls._INVALID_SUBSTRINGS)):
467 467
      _ThrowError("Invalid LVM name '%s'", name)
468 468

  
469 469
  def Remove(self):

Also available in: Unified diff