Revision 870dc44c lib/backend.py

b/lib/backend.py
1943 1943
  @raise RPCFail: if we don't find a valid OS
1944 1944

  
1945 1945
  """
1946
  name_only = name.split("+", 1)[0]
1946
  name_only = objects.OS.GetName(name)
1947 1947
  status, payload = _TryOSFromDisk(name_only, base_dir)
1948 1948

  
1949 1949
  if not status:
......
1978 1978

  
1979 1979
  # OS variants
1980 1980
  if api_version >= constants.OS_API_V15:
1981
    try:
1982
      variant = os_name.split('+', 1)[1]
1983
    except IndexError:
1981
    variant = objects.OS.GetVariant(os_name)
1982
    if not variant:
1984 1983
      variant = inst_os.supported_variants[0]
1985 1984
    result['OS_VARIANT'] = variant
1986 1985

  
......
2528 2527
    _Fail("Unknown checks required for OS %s: %s", osname,
2529 2528
          set(checks).difference(constants.OS_VALIDATE_CALLS))
2530 2529

  
2531
  name_only = osname.split("+", 1)[0]
2530
  name_only = objects.OS.GetName(osname)
2532 2531
  status, tbv = _TryOSFromDisk(name_only, None)
2533 2532

  
2534 2533
  if not status:

Also available in: Unified diff