[yum-git] Makefile test/yum-utils-pylintrc yum-groups-manager.py
Tim Lauridsen
timlau at linux.duke.edu
Wed Sep 24 11:29:53 UTC 2008
Makefile | 2 +-
test/yum-utils-pylintrc | 8 ++++++--
yum-groups-manager.py | 42 +++++++++++++++++++++---------------------
3 files changed, 28 insertions(+), 24 deletions(-)
New commits:
commit 336152fad8f19f03c7752498b6a89a4aa5ca9030
Author: Tim Lauridsen <timlau at fedoraproject.org>
Date: Wed Sep 24 13:29:35 2008 +0200
yum-groups-manager.py to pylint check and cleaned it up
diff --git a/Makefile b/Makefile
index bfd638f..998697d 100644
--- a/Makefile
+++ b/Makefile
@@ -84,6 +84,6 @@ ChangeLog: FORCE
pylint:
@pylint --rcfile=test/yum-utils-pylintrc \
yumdownloader.py yum-complete-transaction.py yum-debug-dump.py yum-builddep.py \
- debuginfo-install.py package-cleanup.py
+ debuginfo-install.py package-cleanup.py yum-groups-manager.py
FORCE:
diff --git a/test/yum-utils-pylintrc b/test/yum-utils-pylintrc
index ebb4a2f..bb2751b 100644
--- a/test/yum-utils-pylintrc
+++ b/test/yum-utils-pylintrc
@@ -64,7 +64,11 @@ load-plugins=
# W0212: *Access to a protected member %s of a client class* (if sucks, but we do that a lot)
# R0801: *Similar lines in %s files* (this is fine, some utils look alike)
# W0613: *Unused argument %r*
-disable-msg=C0324,C0301,C0111,E1101,F0401,R0201,W0704,W0612,W0212,R0801,W0613
+# R0912: *Too many branches (%s/%s)*
+# R0915: *Too many statements (%s/%s)*
+# W0602: *Using global for %r but no assigment is done*
+# W0511: Used when a warning note as FIXME or XXX is detected
+disable-msg=C0324,C0301,C0111,E1101,F0401,R0201,W0704,W0612,W0212,R0801,W0613,R0912,R0915,W0602,W0511
[REPORTS]
@@ -208,7 +212,7 @@ acquired-members=REQUEST,acl_users,aq_parent
[IMPORTS]
# Deprecated modules which should not be used, separated by a comma
-deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
+deprecated-modules=regsub,TERMIOS,Bastion,rexec
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report R0402 must not be disabled)
diff --git a/yum-groups-manager.py b/yum-groups-manager.py
index 75393dc..9aa84e0 100755
--- a/yum-groups-manager.py
+++ b/yum-groups-manager.py
@@ -79,9 +79,9 @@ def setup_opts():
dest="conffile", help="config file location")
return parser
-
-def trans_data(yb, input):
- data = input.split(':', 2)
+
+def trans_data(yb, inp):
+ data = inp.split(':', 2)
if len(data) != 2:
yb.logger.error("Error: Incorrect translated data, should be: 'lang:text'")
sys.exit(50)
@@ -188,17 +188,17 @@ def main():
loaded_files = False
for fname in opts.load:
- try:
- if not os.path.exists(fname):
- yb.logger.error("File not found: %s" % fname)
- continue
- if fname.endswith('.gz'):
- fname = gzip.open(cf)
- comps.add(srcfile=fname)
- loaded_files = True
- except IOError, e:
- yb.logger.error(e)
- sys.exit(50)
+ try:
+ if not os.path.exists(fname):
+ yb.logger.error("File not found: %s" % fname)
+ continue
+ if fname.endswith('.gz'):
+ fname = gzip.open(fname)
+ comps.add(srcfile=fname)
+ loaded_files = True
+ except IOError, e:
+ yb.logger.error(e)
+ sys.exit(50)
if not loaded_files and opts.remove:
yb.logger.error("Can't remove package(s) when we havn't loaded any")
@@ -275,13 +275,13 @@ def main():
group.default_packages[pkgname] = 1
for fname in opts.save:
- try:
- fo = open(fname, "wb")
- fo.write(comps.xml())
- del fo
- except IOError, e:
- yb.logger.error(e)
- sys.exit(50)
+ try:
+ fo = open(fname, "wb")
+ fo.write(comps.xml())
+ del fo
+ except IOError, e:
+ yb.logger.error(e)
+ sys.exit(50)
if (opts.print2stdout or (opts.print2stdout is None and not opts.save)):
print comps.xml()
More information about the Yum-cvs-commits
mailing list