* fix: make --skip-sources work

This commit is contained in:
Eray Özkural
2006-04-07 09:55:01 +00:00
parent a1bc44f623
commit 347660c989
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -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 = ['.']
+2 -2
View File
@@ -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()