Skip to content
Snippets Groups Projects
Commit 6d486888 authored by Seblu's avatar Seblu
Browse files

implement globbing on repository name in list

parent 4571b0d8
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ import time
import datetime
import argparse
import re
import fnmatch
import installsystems
import installsystems.tools as istools
from installsystems.printer import *
......@@ -209,8 +210,11 @@ def c_list(parser, args):
repoman.show(verbose=args.verbose)
else:
for o in args.object:
if o in repoman:
repoman[o].show(verbose=args.verbose)
repos = fnmatch.filter(repoman.names, o)
if len(repos) > 0:
for reponame in repos:
arrow(reponame)
repoman[reponame].show(verbose=args.verbose)
else:
img, repo = select_image(o, repoman, args.best)
img.show(verbose=args.verbose)
......
......@@ -438,6 +438,13 @@ class RepositoryManager(object):
config.offline = True
return Repository(config)
@property
def names(self):
'''
Return the list of repositories name
'''
return [ r.config.name for r in self.repos ]
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