can you replace this with a more sane flow and cleaner error message
```
elif isinstance(repository_path, (tuple, list)) and len(repository_path) == 2:
    return repo(*repository_path)
else:
    msg='repository_path should be a string or list/tuple of maximum 2 elements (current: %s, type %s)'
    _log.error(msg%(repository_path,type(repository_path)))
```