Ignore:
Timestamp:
Dec 28, 2008, 7:19:55 PM (16 years ago)
Author:
price
Message:

invirt.config: fix an error on empty config files

Location:
trunk/packages/invirt-base
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-base/debian/changelog

    r1929 r1933  
    33  * run_parts_list: fix unclear docstring
    44  * config-init.sh: degrade to non-bash gracefully, document better
    5 
    6  -- Greg Price <price@mit.edu>  Sun, 28 Dec 2008 02:46:33 -0500
     5  * invirt.config: fix an error on empty config files
     6
     7 -- Greg Price <price@mit.edu>  Sun, 28 Dec 2008 19:16:03 -0500
    78
    89invirt-base (0.0.17) unstable; urgency=low
  • trunk/packages/invirt-base/python/invirt/config.py

    r1926 r1933  
    2121    """Splice dict-tree d2 into d1.  Return d1.
    2222
     23    d2 may be None for an empty dict-tree, because yaml.load produces that.
     24
    2325    Example:
    2426    >>> d = {'a': {'b': 1}, 'c': 2}
     
    2830    {'a': {'b', 1, 'd': 3}, 'c': 2}
    2931    """
     32    if d2 is None:
     33        return d1
    3034    for k in d2:
    3135        if k in d1 and isinstance(d1[k], dict):
Note: See TracChangeset for help on using the changeset viewer.