From 9f6e5a9f48a0a6e223a305e5b158ee0863d33b7a Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Fri, 19 Jun 2020 23:23:48 +0000 Subject: [PATCH] Move InputURL handling to base Module.__init__ and extract URL string for convenience --- codearchiver/core.py | 1 + codearchiver/modules/git.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codearchiver/core.py b/codearchiver/core.py index 3a50073..7029c09 100644 --- a/codearchiver/core.py +++ b/codearchiver/core.py @@ -123,6 +123,7 @@ class Module: def __init__(self, inputUrl): self._inputUrl = inputUrl + self._url = inputUrl.url self._httpClient = HttpClient() @abc.abstractmethod diff --git a/codearchiver/modules/git.py b/codearchiver/modules/git.py index 1ea1bec..54941a3 100644 --- a/codearchiver/modules/git.py +++ b/codearchiver/modules/git.py @@ -15,8 +15,7 @@ class Git(codearchiver.core.Module): return inputUrl.url.endswith('.git') def __init__(self, inputUrl, extraBranches = {}): - self._inputUrl = inputUrl - self._url = inputUrl.url + super().__init__(inputUrl) self._extraBranches = extraBranches def process(self):