[yum-commits] Branch 'yum-3_2_X' - cli.py test/yum-pylintrc yum/history.py yum/__init__.py yum/pgpmsg.py yum/pkgtag_db.py yum/rpmsack.py yum/update_md.py
Tim Lauridsen
timlau at osuosl.org
Wed Apr 28 11:09:52 UTC 2010
cli.py | 6 +++---
test/yum-pylintrc | 3 ++-
yum/__init__.py | 2 +-
yum/history.py | 2 +-
yum/pgpmsg.py | 7 ++++++-
yum/pkgtag_db.py | 4 ++--
yum/rpmsack.py | 4 ++--
yum/update_md.py | 2 +-
8 files changed, 18 insertions(+), 12 deletions(-)
New commits:
commit f9a70c4fdb7c6c141359028c7249d0d8df1a0036
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Wed Apr 28 13:08:45 2010 +0200
Fix the following pylint errors/warnings
************* Module cli
W0311:169: Bad indentation. Found 19 spaces, expected 20
W0311:170: Bad indentation. Found 19 spaces, expected 20
E0602:728:YumBaseCli.distroSyncPkgs: Undefined variable 'Errors'
************* Module yum
W0311:903: Bad indentation. Found 15 spaces, expected 16
************* Module yum.pgpmsg
W0311:1074: Bad indentation. Found 28 spaces, expected 24
W0108:623:signature.deserialize_subpacket.<lambda>: Lambda may not be necessary
************* Module yum.update_md
W0311: 79: Bad indentation. Found 7 spaces, expected 8
************* Module yum.history
W0611: 25: Unused import sql_esc
************* Module yum.pkgtag_db
E0601: 85:PackageTagDB.search_names: Using variable 'tag' before assignment
W0611: 20: Unused import sql_esc_glob
************* Module yum.rpmsack
W0311:482: Bad indentation. Found 28 spaces, expected 24
E1103:481:RPMDBPackageSack.returnPackages: Instance of 'list' has no 'name' member (but some types could not be inferred)
E1103:482:RPMDBPackageSack.returnPackages: Instance of 'list' has no 'name' member (but some types could not be inferred)
E1103:489:RPMDBPackageSack._uncached_returnConflictPackages: Instance of 'list' has no 'conflicts' member (but some types could not be inferred)
E1103:675:RPMDBPackageSack.fileRequiresData: Instance of 'list' has no 'requires' member (but some types could not be inferred)
E1103:678:RPMDBPackageSack.fileRequiresData: Instance of 'list' has no 'pkgtup' member (but some types could not be inferred)
E9905:1470:RPMDBAdditionalDataPackage._delete: Too many arguments for format string
diff --git a/cli.py b/cli.py
index 4479a5e..2977ca8 100644
--- a/cli.py
+++ b/cli.py
@@ -166,8 +166,8 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
repo = k[:period]
k = k[period+1:]
if repo not in repoopts:
- repoopts[repo] = yum.misc.GenericHolder()
- repoopts[repo].items = []
+ repoopts[repo] = yum.misc.GenericHolder()
+ repoopts[repo].items = []
setattr(repoopts[repo], k, v)
repoopts[repo].items.append(k)
else:
@@ -725,7 +725,7 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
if ipkgs:
try:
pkgs = self.pkgSack.returnNewestByName(patterns=ipkgs.keys())
- except Errors.PackageSackError:
+ except yum.Errors.PackageSackError:
pkgs = []
for pkg in pkgs:
diff --git a/test/yum-pylintrc b/test/yum-pylintrc
index dd3db57..fa3e57c 100644
--- a/test/yum-pylintrc
+++ b/test/yum-pylintrc
@@ -82,7 +82,8 @@ disable-msg-cat=C,R
# W0703: *Catch "Exception"*
# W0710: *Exception doesn't inherit from standard "Exception" class* (give false positives on ex. KeyboardInterrupt)
# W0631: *Using possibly undefined loop variable %r* (Gives to many false positives)
-disable-msg=E1101,F0401,W0704,W0612,W0212,W0613,W0602,W0511,W0401,W0614,W0232,W0201,W0603,W0621,W0142,W0102,W0105,W0702,W0231,E0202,W0622,W0403,W0223,W0104,W1001,W0221,W0703,W0710,W0631
+# E1103: *%s %r has no %r member (but some types could not be inferred)*
+disable-msg=E1101,F0401,W0704,W0612,W0212,W0613,W0602,W0511,W0401,W0614,W0232,W0201,W0603,W0621,W0142,W0102,W0105,W0702,W0231,E0202,W0622,W0403,W0223,W0104,W1001,W0221,W0703,W0710,W0631,E1103
[REPORTS]
diff --git a/yum/__init__.py b/yum/__init__.py
index a2851bd..60adcbd 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -900,7 +900,7 @@ class YumBase(depsolve.Depsolve):
# Try another depsolve
if self.conf.skip_broken and rescode==1:
if clear_skipped:
- self.skipped_packages = [] # reset the public list of skipped packages.
+ self.skipped_packages = [] # reset the public list of skipped packages.
sb_st = time.time()
rescode, restring = self._skipPackagesWithProblems(rescode, restring)
self._printTransaction()
diff --git a/yum/history.py b/yum/history.py
index 3ef5f74..608f9b7 100644
--- a/yum/history.py
+++ b/yum/history.py
@@ -22,7 +22,7 @@ import os, os.path
import glob
from weakref import proxy as weakref
-from sqlutils import sqlite, executeSQL, sql_esc, sql_esc_glob
+from sqlutils import sqlite, executeSQL, sql_esc_glob
import yum.misc as misc
import yum.constants
from yum.constants import *
diff --git a/yum/pgpmsg.py b/yum/pgpmsg.py
index ffd275f..9cf8217 100644
--- a/yum/pgpmsg.py
+++ b/yum/pgpmsg.py
@@ -18,6 +18,11 @@ import struct, time, cStringIO, base64, types
# We use this so that we can work on python-2.4 and python-2.6, and thus.
# use import md5/import sha on the older one and import hashlib on the newer.
# Stupid deprecation warnings.
+
+# pylint: disable-msg=W0108
+# Ignore :W0108: *Lambda may not be necessary*
+
+
try:
import hashlib
except ImportError:
@@ -1071,7 +1076,7 @@ be scanned to make sure they are valid for a pgp certificate."""
if pkt_idx >= len(pkts) :
raise ValueError('subkey at index %d was not followed by a signature' % (pkt_idx-1))
if pkts[pkt_idx].pkt_typ != CTB_PKT_SIG or pkts[pkt_idx].sig_type != SIG_TYPE_SUBKEY_BIND :
- raise ValueError('signature %d doesn\'t bind subkey to key, type is %s' % (pkt_idx, map_to_str(sig_type_to_str, pkts[pkt_idx].sig_typ)))
+ raise ValueError('signature %d doesn\'t bind subkey to key, type is %s' % (pkt_idx, map_to_str(sig_type_to_str, pkts[pkt_idx].sig_typ)))
subkey.append(pkts[pkt_idx])
pkt_idx = pkt_idx + 1
diff --git a/yum/pkgtag_db.py b/yum/pkgtag_db.py
index d2836e4..016dd41 100644
--- a/yum/pkgtag_db.py
+++ b/yum/pkgtag_db.py
@@ -17,7 +17,7 @@
# parse sqlite tag database
# return pkgnames and tag that was matched
-from sqlutils import sqlite, executeSQL, sql_esc, sql_esc_glob
+from sqlutils import sqlite, executeSQL, sql_esc
from Errors import PkgTagsError
import sqlutils
import sys
@@ -82,7 +82,7 @@ class PackageTagDB(object):
"""Search by package name/glob.
Return dict of dict[packagename] = [tag1, tag2, tag3, tag4, ...]"""
res = {}
- (name, esc) = sql_esc(tag)
+ (name, esc) = sql_esc(name)
query = "SELECT name, tag, score FROM packagetags where name like ?%s " % esc
name = '%' + name + '%'
rows = self._sql_exec(query, (name,))
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 444e6d9..83268cc 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -479,7 +479,7 @@ class RPMDBPackageSack(PackageSackBase):
for pkg in pkgobjlist:
for pat in patterns:
if pkg.name == pat:
- self._pkgnames_loaded.add(pkg.name)
+ self._pkgnames_loaded.add(pkg.name)
return pkgobjlist
def _uncached_returnConflictPackages(self):
@@ -1467,7 +1467,7 @@ class RPMDBAdditionalDataPackage(object):
try:
os.unlink(fn)
except (IOError, OSError):
- raise AttributeError, "Cannot delete attribute %s on " % (attr, self)
+ raise AttributeError, "Cannot delete attribute %s on %s " % (attr, self)
def __getattr__(self, attr):
return self._read(attr)
diff --git a/yum/update_md.py b/yum/update_md.py
index c6e2d37..90c5582 100644
--- a/yum/update_md.py
+++ b/yum/update_md.py
@@ -76,7 +76,7 @@ class UpdateNotice(object):
return self._md.get(item) or None
def __setitem__(self, item, val):
- self._md[item] = val
+ self._md[item] = val
def __str__(self):
head = """
More information about the Yum-commits
mailing list