Skip to content

Commit

Permalink
Merge pull request #20 from stfc/returns
Browse files Browse the repository at this point in the history
Cleanup return statements
  • Loading branch information
Oli-Rest authored Jul 17, 2024
2 parents 7f354bd + f419660 commit fed1dbd
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions mrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,7 @@ def rewrite(self):
def listrepos(self, names=None):
if names:
return [repo for repo in self.repos if repo.name in names]
else:
return self.repos
return self.repos

def genmetadata(self):
for repo in self.listrepos(OPTIONS.repos):
Expand Down Expand Up @@ -559,7 +558,7 @@ def lock(self, action):

def unlock(self, action):
if OPTIONS.dryrun:
return True
return
lockfile = path_join(CONFIG.lockdir, self.dist.nick, action + '-' + self.name + '.lock')
info(6, '%s: Removing lock %s' % (self.dist.nick, lockfile))
if path_exists(lockfile):
Expand Down Expand Up @@ -683,8 +682,8 @@ def run(text, dryrun=False):
if not OPTIONS.dryrun or dryrun:
info(5, 'Execute: %s' % text)
return os.system(text)
else:
info(1, 'Not execute: %s' % text)
info(1, 'Not execute: %s' % text)
return 0


def readfile(filename, size=0):
Expand Down Expand Up @@ -764,8 +763,7 @@ def relpath(path, reference):
newpath.append('..')
newpath.append(path.replace(common, '', 1))
return '/'.join(newpath)
else:
return path
return path


def symlink(src, dst):
Expand Down

0 comments on commit fed1dbd

Please sign in to comment.