Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import error for repo settings #37

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions httprequest_lego_provider/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@
from typing import List, Tuple

from git import GitCommandError, Repo
from settings import GIT_REPO_URL

from .settings import GIT_REPO_URL

FILENAME_TEMPLATE = "{domain}.domain"
SPLIT_GIT_REPO_URL = GIT_REPO_URL.split("@")
REPOSITORY_BASE_URL = "@".join(SPLIT_GIT_REPO_URL[:2])
REPOSITORY_USER = SPLIT_GIT_REPO_URL[0].split("//")[1]
REPOSITORY_USER = (
SPLIT_GIT_REPO_URL[0].split("//")[1]
if SPLIT_GIT_REPO_URL and len(SPLIT_GIT_REPO_URL[0].split("//")) > 2
else None
)
REPOSITORY_BRANCH = SPLIT_GIT_REPO_URL[2] if len(SPLIT_GIT_REPO_URL) > 2 else None
RECORD_CONTENT = "{record} 600 IN TXT \042{value}\042\n"

Expand Down
2 changes: 0 additions & 2 deletions httprequest_lego_provider/tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
}
}

GIT_REPO_URL = "git+ssh://user@git.launchpad.net/repo@lego"
Loading