Skip to content

Commit

Permalink
server: drop appending repo name to repo path
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Sep 27, 2023
1 parent efa1ccd commit 802cd09
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions files/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class ManagedRepo:
def __init__(self, url, branch, dest_path):
self.url = url
self.branch = branch
self.dest_path = dest_path
self.path = dest_path
self._init()
self._checkout()

def _init(self):
self.repo = Repo.init(self._path())
self.repo = Repo.init(self.path)
self.repo.description = self.name
if 'origin' in self.repo.remotes:
self.origin = self.repo.remotes['origin']
Expand All @@ -52,9 +52,6 @@ def _checkout(self):
log.debug('Checking out: %s', self.branch)
self.repo.head.ref.checkout()

def _path(self):
return path.join(self.dest_path, self.name)

@property
def name(self):
if self.url.startswith('https://'):
Expand Down

0 comments on commit 802cd09

Please sign in to comment.