[yum-commits] Branch 'yum-3_2_X' - 2 commits - cli.py output.py
Tim Lauridsen
timlau at osuosl.org
Mon Mar 30 08:06:42 UTC 2009
cli.py | 30 ++++++++++++++----------------
output.py | 14 +++++++-------
2 files changed, 21 insertions(+), 23 deletions(-)
New commits:
commit 02d4762454f628bfddfabbc399272191e282c839
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Mon Mar 30 10:06:30 2009 +0200
fix indentation and unused imports pylint warnings
diff --git a/output.py b/output.py
index 62af285..dee8826 100755
--- a/output.py
+++ b/output.py
@@ -29,7 +29,7 @@ import re # For YumTerm
from urlgrabber.progress import TextMeter
import urlgrabber.progress
from urlgrabber.grabber import URLGrabError
-from yum.misc import sortPkgObj, prco_tuple_to_string, to_str, to_utf8, to_unicode, get_my_lang_code
+from yum.misc import prco_tuple_to_string, to_str, to_utf8, to_unicode
import yum.misc
from rpmUtils.miscutils import checkSignals
from yum.constants import *
@@ -865,14 +865,14 @@ class YumOutput:
size = int(pkg.size)
totsize += size
try:
- if pkg.verifyLocalPkg():
- locsize += size
+ if pkg.verifyLocalPkg():
+ locsize += size
except:
- pass
+ pass
except:
- error = True
- self.logger.error(_('There was an error calculating total download size'))
- break
+ error = True
+ self.logger.error(_('There was an error calculating total download size'))
+ break
if (not error):
if locsize:
commit 7b0b882b7b1ee6713538c91d676000994d7a8686
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Mon Mar 30 09:58:25 2009 +0200
fix pylint warnings
************* Module cli
W:309: Bad indentation. Found 11 spaces, expected 12
W:310: Bad indentation. Found 11 spaces, expected 12
W:311: Bad indentation. Found 14 spaces, expected 16
W:359: Bad indentation. Found 16 spaces, expected 12
W:360: Bad indentation. Found 16 spaces, expected 12
W:505: Bad indentation. Found 15 spaces, expected 16
W:506: Bad indentation. Found 18 spaces, expected 20
W:512: Bad indentation. Found 15 spaces, expected 16
W: 40: Unused import isMultiLibArch
W: 38: Unused import TS_OBSOLETED
W: 42: Unused import YumLocalPackage
diff --git a/cli.py b/cli.py
index 3cfb402..c77c765 100644
--- a/cli.py
+++ b/cli.py
@@ -35,11 +35,9 @@ import yum.Errors
import yum.logginglevels
import yum.misc
import yum.plugins
-from yum.constants import TS_OBSOLETED
import rpmUtils.arch
-from rpmUtils.arch import isMultiLibArch
import rpmUtils.miscutils
-from yum.packages import parsePackages, YumLocalPackage
+from yum.packages import parsePackages
from yum import _
from yum.rpmtrans import RPMTransaction
import signal
@@ -306,9 +304,9 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
disk[m.group(2)] = int(m.group(1))
if disk:
- summary += _('Disk Requirements:\n')
- for k in disk:
- summary += _(' At least %dMB needed on the %s filesystem.\n') % (disk[k], k)
+ summary += _('Disk Requirements:\n')
+ for k in disk:
+ summary += _(' At least %dMB needed on the %s filesystem.\n') % (disk[k], k)
# TODO: simplify the dependency errors?
@@ -356,8 +354,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
# just make sure there's not, well, nothing to do
if len(self.tsInfo) == 0:
- self.verbose_logger.info(_('Trying to run the transaction but nothing to do. Exiting.'))
- return 1
+ self.verbose_logger.info(_('Trying to run the transaction but nothing to do. Exiting.'))
+ return 1
# NOTE: In theory we can skip this in -q -y mode, for a slight perf.
# gain. But it's probably doom to have a different code path.
@@ -502,14 +500,14 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
continue
elif result == 1:
- if not sys.stdin.isatty() and not self.conf.assumeyes:
- raise yum.Errors.YumBaseError, \
- _('Refusing to automatically import keys when running ' \
- 'unattended.\nUse "-y" to override.')
-
- # the callback here expects to be able to take options which
- # userconfirm really doesn't... so fake it
- self.getKeyForPackage(po, lambda x, y, z: self.userconfirm())
+ if not sys.stdin.isatty() and not self.conf.assumeyes:
+ raise yum.Errors.YumBaseError, \
+ _('Refusing to automatically import keys when running ' \
+ 'unattended.\nUse "-y" to override.')
+
+ # the callback here expects to be able to take options which
+ # userconfirm really doesn't... so fake it
+ self.getKeyForPackage(po, lambda x, y, z: self.userconfirm())
else:
# Fatal error
More information about the Yum-commits
mailing list