Save this configuration data into a dictionary.

def to_dict(self):
        '''Save this configuration data into a dictionary.'''
        d = {'name': self.name}
        if self.data:
            d['data'] = self.data
        return d