add split and check at beginning
This commit is contained in:
parent
da3901d742
commit
3d50223fe3
@ -183,8 +183,18 @@ class RepoSync:
|
|||||||
|
|
||||||
# The repo name should be valid
|
# The repo name should be valid
|
||||||
if self.repo is not None:
|
if self.repo is not None:
|
||||||
if self.repo not in self.repos:
|
bad_repo_list = []
|
||||||
self.log.error(Color.FAIL + 'Invalid repository: ' + self.repo)
|
repo_list_if_commas = self.repo.split(',')
|
||||||
|
for repoitem in repo_list_if_commands:
|
||||||
|
if repoitem not in self.repos:
|
||||||
|
bad_repo_list.append(repoitem)
|
||||||
|
|
||||||
|
if len(bad_repo_list) > 0:
|
||||||
|
self.log.error(
|
||||||
|
Color.BOLD + Color.RED + 'These repos are not listed:' + Color.END
|
||||||
|
)
|
||||||
|
for badrepo in bad_repo_list:
|
||||||
|
self.log.error(badrepo)
|
||||||
raise SystemExit()
|
raise SystemExit()
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user