diff --git a/pisi/api.py b/pisi/api.py index 350aef2b..4b0d277b 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -293,7 +293,8 @@ def check(package): ctx.ui.info("OK", False) return corrupt -def index(dirs, output = 'pisi-index.xml', skip_sources=False): +def index(dirs=None, output = 'pisi-index.xml', skip_sources=False): + """accumulate PISI XML files in a directory""" index = Index() if not dirs: dirs = ['.'] diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index af545b4d..83f056b3 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -732,10 +732,10 @@ source and binary packages. self.init() from pisi.api import index if len(self.args)>0: - index(self.args, ctx.get_option('output')) + index(self.args, ctx.get_option('output'), skip_sources = ctx.get_option('skip_sources')) elif len(self.args)==0: ctx.ui.info(_('Indexing current directory.')) - index('.', ctx.get_option('output'), skip_sources = ctx.get_option('skip_sources')) + index(['.'], ctx.get_option('output'), skip_sources = ctx.get_option('skip_sources')) self.finalize()