MCPcopy
hub / github.com/mandarons/icloud-docker / get_photos_destination_path

Function get_photos_destination_path

src/config_parser.py:454–476  ·  view source on GitHub ↗

Get photos destination path from config without creating directory. Args: config: Configuration dictionary Returns: Photos destination path string

(config: dict)

Source from the content-addressed store, hash-verified

452
453
454def get_photos_destination_path(config: dict) -> str:
455 """Get photos destination path from config without creating directory.
456
457 Args:
458 config: Configuration dictionary
459
460 Returns:
461 Photos destination path string
462 """
463 config_path = ["photos", "destination"]
464 photos_destination = get_config_value_or_default(
465 config=config,
466 config_path=config_path,
467 default=DEFAULT_PHOTOS_DESTINATION,
468 )
469
470 if not traverse_config_path(config=config, config_path=config_path):
471 log_config_not_found_warning(
472 config_path,
473 f"destination is missing. Using default photos destination: {config_path_to_string(config_path)}",
474 )
475
476 return photos_destination
477
478
479def prepare_photos_destination(config: dict) -> str:

Callers 1

Calls 4

traverse_config_pathFunction · 0.90
config_path_to_stringFunction · 0.90

Tested by

no test coverage detected