* def args for upgrade
This commit is contained in:
@@ -431,12 +431,14 @@ reinstall a package from a pisi file, use the install command."""
|
|||||||
default=False, help=_("eager upgrades"))
|
default=False, help=_("eager upgrades"))
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if not self.args:
|
|
||||||
self.help()
|
|
||||||
return
|
|
||||||
|
|
||||||
self.init()
|
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()
|
self.finalize()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+12
-7
@@ -710,17 +710,22 @@ class autoxml(oo.autosuper, oo.autoprop):
|
|||||||
|
|
||||||
def errors(l, where):
|
def errors(l, where):
|
||||||
errs = []
|
errs = []
|
||||||
for ix in range(len(l)):
|
ix = 1
|
||||||
errs.extend(errors_item(l[ix], where + '[%s]' % ix))
|
for node in l:
|
||||||
|
errs.extend(errors_item(node, where + '[%s]' % ix))
|
||||||
|
ix += 1
|
||||||
return errs
|
return errs
|
||||||
|
|
||||||
def format(l, f, errs):
|
def format(l, f, errs):
|
||||||
# indent here
|
# TODO: indent here
|
||||||
for ix in range(len(l)):
|
ix = 1
|
||||||
f.add_flowing_data(str(ix+1) + ': ')
|
length = len(l)
|
||||||
format_item(l[ix], f, errs)
|
for node in l:
|
||||||
if ix != len(l)-1:
|
f.add_flowing_data(str(ix) + ': ')
|
||||||
|
format_item(node, f, errs)
|
||||||
|
if ix != length:
|
||||||
f.add_flowing_data(', ')
|
f.add_flowing_data(', ')
|
||||||
|
ix += 1
|
||||||
|
|
||||||
return (init, decode, encode, errors, format)
|
return (init, decode, encode, errors, format)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user