Browse Source

Move InputURL handling to base Module.__init__ and extract URL string for convenience

tags/v1.0
JustAnotherArchivist 4 years ago
parent
commit
9f6e5a9f48
2 changed files with 2 additions and 2 deletions
  1. +1
    -0
      codearchiver/core.py
  2. +1
    -2
      codearchiver/modules/git.py

+ 1
- 0
codearchiver/core.py View File

@@ -123,6 +123,7 @@ class Module:


def __init__(self, inputUrl): def __init__(self, inputUrl):
self._inputUrl = inputUrl self._inputUrl = inputUrl
self._url = inputUrl.url
self._httpClient = HttpClient() self._httpClient = HttpClient()


@abc.abstractmethod @abc.abstractmethod


+ 1
- 2
codearchiver/modules/git.py View File

@@ -15,8 +15,7 @@ class Git(codearchiver.core.Module):
return inputUrl.url.endswith('.git') return inputUrl.url.endswith('.git')


def __init__(self, inputUrl, extraBranches = {}): def __init__(self, inputUrl, extraBranches = {}):
self._inputUrl = inputUrl
self._url = inputUrl.url
super().__init__(inputUrl)
self._extraBranches = extraBranches self._extraBranches = extraBranches


def process(self): def process(self):


Loading…
Cancel
Save