Use omitNone properly in print_cfg.