Skip to content
Snippets Groups Projects
Commit 9924f0bf authored by Seblu's avatar Seblu
Browse files

list repo matching only on onlines repositories

parent 8d02ec9c
No related branches found
No related tags found
No related merge requests found
......@@ -210,7 +210,7 @@ def c_list(parser, args):
repoman.show(verbose=args.verbose)
else:
for o in args.object:
repos = fnmatch.filter(repoman.names, o)
repos = fnmatch.filter(repoman.onlines, o)
if len(repos) > 0:
for reponame in repos:
arrow(reponame)
......
......@@ -424,7 +424,6 @@ class RepositoryManager(object):
# get remote last value
try:
rlast = int(istools.uopen(config.lastpath).read().strip())
# get local last value
llast = int(os.stat(filedest).st_mtime)
# if repo is out of date, download it
......@@ -445,10 +444,24 @@ class RepositoryManager(object):
@property
def names(self):
'''
Return the list of repositories name
Return list of repository names
'''
return [ r.config.name for r in self.repos ]
@property
def onlines(self):
'''
Return list of online repository names
'''
return [ r.config.name for r in self.repos if not r.config.offline ]
@property
def offlines(self):
'''
Return list of offlines repository names
'''
return [ r.config.name for r in self.repos if r.config.offline ]
def get(self, name, version=None, best=False):
'''
Crawl repositories to get an image
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment