* def args for upgrade

This commit is contained in:
Eray Özkural
2005-11-06 04:07:20 +00:00
parent 289af8c844
commit 023de74501
2 changed files with 19 additions and 12 deletions
+7 -5
View File
@@ -431,12 +431,14 @@ reinstall a package from a pisi file, use the install command."""
default=False, help=_("eager upgrades"))
def run(self):
if not self.args:
self.help()
return
self.init()
pisi.api.upgrade(self.args)
if not self.args:
packages = ctx.installdb.list_installed()
else:
packages = self.args
pisi.api.upgrade(packages)
self.finalize()
+12 -7
View File
@@ -710,17 +710,22 @@ class autoxml(oo.autosuper, oo.autoprop):
def errors(l, where):
errs = []
for ix in range(len(l)):
errs.extend(errors_item(l[ix], where + '[%s]' % ix))
ix = 1
for node in l:
errs.extend(errors_item(node, where + '[%s]' % ix))
ix += 1
return errs
def format(l, f, errs):
# indent here
for ix in range(len(l)):
f.add_flowing_data(str(ix+1) + ': ')
format_item(l[ix], f, errs)
if ix != len(l)-1:
# TODO: indent here
ix = 1
length = len(l)
for node in l:
f.add_flowing_data(str(ix) + ': ')
format_item(node, f, errs)
if ix != length:
f.add_flowing_data(', ')
ix += 1
return (init, decode, encode, errors, format)