From e4618876dc2c6d935daee8bfe2f711482d87571f Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Thu, 25 Mar 2021 15:18:33 +0100 Subject: [PATCH] Git: Use new AddOn.dirs dictionary mapping instead of old list. --- wau/providers/git.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wau/providers/git.py b/wau/providers/git.py index 8ccfd00..f3284d2 100644 --- a/wau/providers/git.py +++ b/wau/providers/git.py @@ -52,12 +52,13 @@ class Git(Provider): @classmethod def _pull(cls, addon: Addon) -> bool: logger.debug("Git pull %s", addon) - head = cls._head(addon.dirs[0]) # git doesn't care which AddOn dir, as long as we're in the repo + path = next(iter(addon.dirs.values())) # git doesn't care which AddOn dir, as long as we're in the repo + head = cls._head(path) subprocess.run( ["git", "pull", "--quiet"], - cwd=str(addon.dirs[0]) + cwd=str(path) ) - return head != cls._head(addon.dirs[0]) + return head != cls._head(path) @classmethod def _head(cls, path: Path) -> bytes: