Changeset 1935 for trunk


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

invirt.common: handle yaml's None with empty struct for good error message

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

Legend:

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

    r1934 r1935  
    55  * invirt.config: fix an error on empty config files
    66  * invirt.common: give clearer error message on missing config variable
     7  * invirt.common: handle yaml's None with empty struct for good error message
    78
    89 -- Greg Price <price@mit.edu>  Sun, 28 Dec 2008 19:18:51 -0500
  • trunk/packages/invirt-base/python/invirt/common.py

    r1934 r1935  
    4040    elif type(x) == list:
    4141        return [dicts2struct(v, newprefix(i)) for i, v in enumerate(x)]
     42    elif x is None:
     43        return struct({}, prefix)
    4244    else:
    4345        return x
Note: See TracChangeset for help on using the changeset viewer.