Skip to content

Commit

Permalink
Python < 3.6 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
jonashaag committed Oct 19, 2020
1 parent 32cc0e7 commit 336f5bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions klaus/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def name(self):
@property
def namespaced_name(self):
if self.namespace:
return f"~{self.namespace}/{self.name}"
return "~{}/{}".format(self.namespace, self.name)
else:
return self.name

Expand Down Expand Up @@ -365,6 +365,6 @@ def name(self):
@property
def namespaced_name(self):
if self.namespace:
return f"~{self.namespace}/{self.name}"
return "~{}/{}".format(self.namespace, self.name)
else:
return self.name
2 changes: 1 addition & 1 deletion klaus/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _get_repo_and_rev(repo, namespace=None, rev=None, path=None):
rev += "/" + path.rstrip("/")

if namespace:
repo_key = f"~{namespace}/{repo}"
repo_key = "~{}/{}".format(namespace, repo)
else:
repo_key = repo
try:
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

TEST_REPO = os.path.abspath("tests/repos/build/test_repo")
TEST_REPO_ROOT = os.path.abspath("tests/repos/build")
TEST_REPO_BASE_URL = f"~{NAMESPACE}/test_repo/"
TEST_REPO_BASE_URL = "~{}/test_repo/".format(NAMESPACE)
UNAUTH_TEST_REPO_URL = UNAUTH_TEST_SERVER + TEST_REPO_BASE_URL
AUTH_TEST_REPO_URL = AUTH_TEST_SERVER + TEST_REPO_BASE_URL

Expand Down

0 comments on commit 336f5bf

Please sign in to comment.