Changeset 14383 in genesis for tools/gformat.py


Ignore:
Timestamp:
Jul 2, 2019, 9:18:41 AM (5 years ago)
Author:
rick
Message:

Fix YAMLLoadWarning deprecation

https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r14376 r14383  
    10551055  elems = sorted([elem for elem in config.keys() if (elem.startswith('iface_') and not "lo0" in elem)])
    10561056  if extra == False:
    1057     return filter(lambda x: not "extra" in x, elems)
     1057    return list(filter(lambda x: not "extra" in x, elems))
    10581058  else:
    10591059    return elems
     
    16651665  ## roomburgh=Roomburgh1
    16661666  ## apkerk1.Vosko=172.17.176.8 ;this as well
    1667   dns_list = yaml.load(open(os.path.join(NODE_DIR,'../dns/staticDNS.yaml'),'r'))
     1667  dns_list = yaml.load(open(os.path.join(NODE_DIR,'../dns/staticDNS.yaml'),'r'), Loader=Loader)
    16681668
    16691669  # Hack to allow special entries, for development
Note: See TracChangeset for help on using the changeset viewer.