Add a value to the attribute dict if non-empty. Args: attr_dict (dict): The dictionary to add the values to key (str): The key for the new value value (str): The value to add Returns: The updated attribute dictionary
(attr_dict, key, value)
| 462 | |
| 463 | |
| 464 | def add_value(attr_dict, key, value): |
| 465 | """Add a value to the attribute dict if non-empty. |
| 466 | |
| 467 | Args: |
| 468 | attr_dict (dict): The dictionary to add the values to |
| 469 | key (str): The key for the new value |
| 470 | value (str): The value to add |
| 471 | |
| 472 | Returns: |
| 473 | The updated attribute dictionary |
| 474 | """ |
| 475 | if value != "" and value is not None: |
| 476 | attr_dict[key] = value |
| 477 | |
| 478 | return attr_dict |
| 479 | |
| 480 | |
| 481 | def dump_database_servers(output_file, selected_servers, |
no outgoing calls
no test coverage detected