44 commits - client/tools rel-eng/packages
by Michael Mraka
client/tools/rhnpush/archive.py | 44 +++++++++-------
client/tools/rhnpush/rhnpush.py | 50 ++++++++++++------
client/tools/rhnpush/rhnpush.spec | 17 ++++++
client/tools/rhnpush/rhnpush_config.py | 1
client/tools/rhnpush/rhnpush_confmanager.py | 16 +++---
client/tools/rhnpush/rhnpush_v2.py | 3 -
client/tools/rhnpush/solaris2mpm.py | 66 ++++++++-----------------
client/tools/rhnpush/test/testRhnpushConfig.py | 1
client/tools/rhnpush/test/testUtils.py | 23 +++++---
client/tools/rhnpush/test/test_archive.py | 12 +++-
client/tools/rhnpush/uploadLib.py | 20 +++++--
client/tools/rhnpush/utils.py | 1
rel-eng/packages/rhnpush | 2
13 files changed, 147 insertions(+), 109 deletions(-)
New commits:
commit c4117196cbfbe3e6e3f58640de39b59c58fa3dcf
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 18:33:09 2012 +0200
Automatic commit of package [rhnpush] release [5.5.52-1].
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index c468f10..dbc9b92 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -4,7 +4,7 @@ Name: rhnpush
Group: Applications/System
License: GPLv2
URL: http://fedorahosted.org/spacewalk
-Version: 5.5.51
+Version: 5.5.52
Release: 1%{?dist}
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -75,6 +75,9 @@ spacewalk-pylint $RPM_BUILD_ROOT%{rhnroot}
%doc COPYING
%changelog
+* Fri Aug 24 2012 Michael Mraka <michael.mraka(a)redhat.com> 5.5.52-1
+- turned on pylint checks
+- fixed pylint errors/warnings
* Tue Aug 21 2012 Michael Mraka <michael.mraka(a)redhat.com> 5.5.51-1
- removed dead code
- fixed pylint errors
diff --git a/rel-eng/packages/rhnpush b/rel-eng/packages/rhnpush
index dc30227..55152cb 100644
--- a/rel-eng/packages/rhnpush
+++ b/rel-eng/packages/rhnpush
@@ -1 +1 @@
-5.5.51-1 client/tools/rhnpush/
+5.5.52-1 client/tools/rhnpush/
commit 85c7d1f2f05ef7e1e74fdd4ecd244b07aee6c7ad
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 18:10:12 2012 +0200
disabled warnings ConfManager.get_config: Attribute 'files' defined outside __init__
ConfManager.get_config: Attribute 'verbose' defined outside __init__
ConfManager.get_config: Attribute 'count' defined outside __init__
ConfManager.get_config: Attribute 'cache_lifetime' defined outside __init__
ConfManager.get_config: Attribute 'orgid' defined outside __init__
ConfManager._files_to_list: Attribute 'exclude' defined outside __init__
ConfManager.get_config: Attribute 'channel' defined outside __init__
main: Attribute 'proxy' defined outside __init__
ConfManager._files_to_list: Attribute 'exclude' defined outside __init__
ConfManager.get_config: Attribute 'channel' defined outside __init__
diff --git a/client/tools/rhnpush/rhnpush_config.py b/client/tools/rhnpush/rhnpush_config.py
index 324b52c..8fd5ecd 100644
--- a/client/tools/rhnpush/rhnpush_config.py
+++ b/client/tools/rhnpush/rhnpush_config.py
@@ -26,6 +26,7 @@ import ConfigParser
#Uses a ConfigParser to create a dictionary of the configuration options.
#That dictionary is then used to add instance variables to the object dynamically.
class rhnpushConfigParser:
+ # pylint: disable=W0201
_instance = None
def __init__(self, filename=None, ensure_consistency=False):
commit f7fda7a77cb2dea0ee717981d24c6b3b6ac251ef
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 10:15:45 2012 +0200
turned on pylint checks
diff --git a/client/tools/rhnpush/rhnpush.spec b/client/tools/rhnpush/rhnpush.spec
index a89b143..c468f10 100644
--- a/client/tools/rhnpush/rhnpush.spec
+++ b/client/tools/rhnpush/rhnpush.spec
@@ -19,6 +19,12 @@ BuildRequires: rhn-client-tools
%endif
BuildRequires: docbook-utils, gettext
BuildRequires: python-devel
+%if 0%{?fedora} > 15 || 0%{?rhel} > 5
+# pylint check
+BuildRequires: spacewalk-pylint
+BuildRequires: rhn-client-tools
+BuildRequires: spacewalk-backend-libs > 1.8.33
+%endif
Summary: Package uploader for the Red Hat Network Satellite Server
@@ -48,6 +54,12 @@ rm -fv $RPM_BUILD_ROOT%{_mandir}/man8/solaris2mpm.8*
%clean
rm -rf $RPM_BUILD_ROOT
+%check
+%if 0%{?fedora} > 15 || 0%{?rhel} > 5
+# check coding style
+export PYTHONPATH=$RPM_BUILD_ROOT%{python_sitelib}:/usr/share/rhn
+spacewalk-pylint $RPM_BUILD_ROOT%{rhnroot}
+%endif
%files
%dir %{rhnroot}/rhnpush
commit d581897e3648ab94a2a2d21fc86e4d13957b186e
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 10:21:22 2012 +0200
disabled Unable to import 'cgiwrap'
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index 0f2b665..a21a764 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -32,6 +32,7 @@ except ImportError:
# old-style xmlrpclib library
rpclib = xmlrpclib
Binary = rpclib.Binary
+ # pylint: disable=F0401
import cgiwrap
Output = cgiwrap.Output
commit a0862e02748737e71e895a95e861973fff3ac318
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 10:09:20 2012 +0200
disable warning ArchiveParser.direct_read: Catch "Exception"
diff --git a/client/tools/rhnpush/archive.py b/client/tools/rhnpush/archive.py
index bccf52f..748879b 100644
--- a/client/tools/rhnpush/archive.py
+++ b/client/tools/rhnpush/archive.py
@@ -183,6 +183,7 @@ class ArchiveParser(object):
""" Returns the contens of the file, file is relative path in archive.
Top most level (_get_archive_dir) is automaticaly added.
"""
+ # pylint: disable=W0703
f = os.path.join(os.path.abspath(self._archive_dir), filename)
contents = None
commit f159ffeeb4b08da2ff0972b0d0cf8e5f24c6ebd0
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 10:07:17 2012 +0200
fixed ArchiveParser._explode: Unused argument 'archive'
diff --git a/client/tools/rhnpush/archive.py b/client/tools/rhnpush/archive.py
index 764d3c6..bccf52f 100644
--- a/client/tools/rhnpush/archive.py
+++ b/client/tools/rhnpush/archive.py
@@ -65,7 +65,7 @@ class ArchiveParser(object):
self._temp_dir = tempfile.mktemp()
os.mkdir(self._temp_dir, 0700)
- self._explode(archive)
+ self._explode()
# destructor ---------------------------------------------------------
@@ -88,7 +88,7 @@ class ArchiveParser(object):
raise NotImplementedError("ArchiveParser: abstract base class method '_explode_cmd'")
- def _explode(self, archive):
+ def _explode(self):
"""[internal] Explode a archive for neutral parsing"""
cmd = self._explode_cmd()
@@ -243,7 +243,7 @@ class ZipParser(ArchiveParser):
def _get_archive_dir(self):
return self.zip_file.namelist()[0]
- def _explode(self, archive):
+ def _explode(self):
"""Explode zip archive"""
self._archive_dir = os.path.join(self._temp_dir,
self._get_archive_dir()).rstrip('/')
@@ -268,7 +268,7 @@ class TarParser(ArchiveParser):
def _get_archive_dir(self):
return self.tar_file.getnames()[0]
- def _explode(self, archive):
+ def _explode(self):
"""Explode tar archive"""
self._archive_dir = os.path.join(self._temp_dir, self._get_archive_dir())
commit 121c22df59dc1a535273e1e7ebaac53ed0588b5c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 10:04:00 2012 +0200
fixed Unused variable 'dirs' Unused variable 'wr'
diff --git a/client/tools/rhnpush/archive.py b/client/tools/rhnpush/archive.py
index 3837b11..764d3c6 100644
--- a/client/tools/rhnpush/archive.py
+++ b/client/tools/rhnpush/archive.py
@@ -208,7 +208,7 @@ class ArchiveParser(object):
zip_file = os.path.join(self._parent_dir, "%s.zip" % zip_dir)
fd = zipfile.ZipFile(zip_file, 'w', zipfile.ZIP_DEFLATED)
- for base, dirs, files in os.walk(zip_dir):
+ for base, _dirs, files in os.walk(zip_dir):
fd.write(base)
for f in files:
fd.write(os.path.join(base, f))
@@ -329,7 +329,7 @@ def _my_popen(cmd):
txt = ""
while 1:
- rd, wr, ex = select.select([ popen.stdout, popen.stderr ], [], [ popen.stdout, popen.stderr ], 5)
+ rd, _wr, ex = select.select([ popen.stdout, popen.stderr ], [], [ popen.stdout, popen.stderr ], 5)
if ex:
txt += popen.stdout.read()
txt += popen.stderr.read()
commit e2d2ff7121edd423d938b10e4eb8f3e60341bef0
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 10:01:39 2012 +0200
_my_popen() already raises exception if status != 0
fixing
ArchiveParser._explode: Unused variable 'status'
ArchiveParser.cpio: Unused variable 'stat'
diff --git a/client/tools/rhnpush/archive.py b/client/tools/rhnpush/archive.py
index 9c8a78b..3837b11 100644
--- a/client/tools/rhnpush/archive.py
+++ b/client/tools/rhnpush/archive.py
@@ -97,7 +97,7 @@ class ArchiveParser(object):
assert self._archive_dir is not None # assigned in _explode_cmd
if cmd:
- status = _my_popen(cmd)
+ _my_popen(cmd)
if os.path.isdir(self._archive_dir):
return
@@ -226,7 +226,7 @@ class ArchiveParser(object):
cpio_file = os.path.join(self._temp_dir, "%s.pkg" % prefix)
cmd = "pkgtrans -s %s %s %s" % (self._archive_dir, cpio_file, prefix)
- stat = _my_popen(cmd)
+ _my_popen(cmd)
if os.path.isfile(cpio_file):
return cpio_file
@@ -342,7 +342,7 @@ def _my_popen(cmd):
if status != 0:
raise Exception("%s exited with status %s and error\n%s" % (cmd, status, txt))
- return status
+ return
# NOTE these next two functions rely on file magic to determine the compression
# and archive types. some file magic information can be found here:
@@ -379,10 +379,7 @@ def _decompress(archive):
print "Decompressing archive"
- stat = _my_popen("%s %s" % (cmd, archive))
-
- if stat != 0:
- raise DecompressionError("Error decompressing '%s'" % archive)
+ _my_popen("%s %s" % (cmd, archive))
# remove the now invalid suffix from the archive name
for sfx in sfx_list:
commit d034bac417401950304601e918e15ac15d61c175
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 09:49:50 2012 +0200
fixed ZipParser: Method '_explode_cmd' is abstract in class 'ArchiveParser' but is not overridden TarParser: Method '_explode_cmd' is abstract in class 'ArchiveParser' but is not overridden
diff --git a/client/tools/rhnpush/archive.py b/client/tools/rhnpush/archive.py
index 556af6f..9c8a78b 100644
--- a/client/tools/rhnpush/archive.py
+++ b/client/tools/rhnpush/archive.py
@@ -255,6 +255,9 @@ class ZipParser(ArchiveParser):
(self._archive_dir, str(e)))
return
+ def _explode_cmd(self):
+ pass
+
# parser for tar archives ------------------------------------------------
class TarParser(ArchiveParser):
@@ -276,6 +279,9 @@ class TarParser(ArchiveParser):
(self._archive_dir, str(e)))
return
+ def _explode_cmd(self):
+ pass
+
# parser for cpio archives -----------------------------------------------
class CpioParser(ArchiveParser):
commit 51a72a32426708d5431a79fe4dfc7a97100c2cff
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 09:47:57 2012 +0200
fixed get_archive_parser: Invalid name "Class" (should match [a-z_][a-zA-Z0-9_]{,30}$)
diff --git a/client/tools/rhnpush/archive.py b/client/tools/rhnpush/archive.py
index 314fa51..556af6f 100644
--- a/client/tools/rhnpush/archive.py
+++ b/client/tools/rhnpush/archive.py
@@ -393,31 +393,31 @@ def get_archive_parser(archive, tempdir="/tmp/"):
# decompress the archive
archive = _decompress(archive)
- Class = None
+ parserClass = None
fd = open(archive, 'r')
magic = fd.read(4)
if magic == "PK\x03\x04":
- Class = ZipParser
+ parserClass = ZipParser
fd.seek(0)
magic = fd.read(20)
if magic == "# PaCkAgE DaTaStReAm":
- Class = CpioParser
+ parserClass = CpioParser
fd.seek(257)
magic = fd.read(5)
if magic == "ustar":
- Class = TarParser
+ parserClass = TarParser
# pre-posix tar doesn't have any standard file magic
if archive.endswith(".tar"):
- Class = TarParser
+ parserClass = TarParser
fd.close()
- if Class is None:
+ if parserClass is None:
raise UnknownArchiveError("Wasn't able to identify: '%s'" % archive)
- return Class(archive, tempdir)
+ return parserClass(archive, tempdir)
commit 4286838022d7439cb44aec52746454557bccf353
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 09:37:27 2012 +0200
disabled listMissingSourcePackagesBySession: Invalid name "listMissingSourcePackagesBySession" (should match [a-z_][a-zA-Z0-9_]{,30}$) getSourcePackageChecksumBySession: Invalid name "getSourcePackageChecksumBySession" (should match [a-z_][a-zA-Z0-9_]{,30}$) exists_getPackageChecksumBySession: Invalid name "exists_getPackageChecksumBySession" (should match [a-z_][a-zA-Z0-9_]{,30}$) ReportError: Invalid name "ReportError" (should match [a-z_][a-zA-Z0-9_]{,30}$)
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index 967daf6..0f2b665 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -608,6 +608,7 @@ def parseXMLRPCfault(fault):
faultCode = -faultCode
return ServerFault(faultCode, "", fault.faultString)
+# pylint: disable=C0103
def listChannelBySession(server, session_string, channels):
return call(server.packages.listChannelBySession, channels, session_string)
commit 2e689e2e994dfafe7a0d1b255208fcad6b2ed685
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 09:34:59 2012 +0200
fixed UploadClass.setRelativeDir: Attribute 'relativeDir' defined outside __init__
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index c7dc3a4..967daf6 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -71,6 +71,7 @@ class UploadClass:
self.server = None
self.session = None
self.orgId = None
+ self.relativeDir = None
def warn(self, verbose, *args):
if self.options.verbose >= verbose:
commit 2604981f022274406239da4627f99d3bea3d5f19
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 09:31:27 2012 +0200
disabled warning UploadClass.readSession: Catch "Exception"
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index 8fcccc3..c7dc3a4 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -413,6 +413,7 @@ class UploadClass:
return call(self.server.packages.check_session, session)
def readSession(self):
+ # pylint: disable=W0703
try:
self.session = rhnpush_cache.RHNPushSession()
self.session.readSession()
commit bf07257208a7b1c1eb000102b0782aa470c73d5e
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 09:28:49 2012 +0200
fixed Unused variable 'pkg_channel' Unused variable 'e'
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index a2cc5af..8fcccc3 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -303,7 +303,7 @@ class UploadClass:
to_push = []
for pkg in pkglist:
- pkg_name, pkg_channel = pkg[:2]
+ pkg_name, _pkg_channel = pkg[:2]
if not localPackagesHash.has_key(pkg_name):
# We don't have it
continue
@@ -416,7 +416,7 @@ class UploadClass:
try:
self.session = rhnpush_cache.RHNPushSession()
self.session.readSession()
- except Exception, e:
+ except Exception:
self.session = None
def writeSession(self, session):
commit f43a43c896dcf5c38037b0a359440e17d0470095
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Thu Aug 23 09:26:50 2012 +0200
fixed UploadClass.die: Method could be a function UploadClass._processFile: Method could be a function
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index ec47579..a2cc5af 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -76,7 +76,8 @@ class UploadClass:
if self.options.verbose >= verbose:
ReportError(*args)
- def die(self, errcode, *args):
+ @staticmethod
+ def die(errcode, *args):
ReportError(*args)
#pkilambi:bug#176358:this should exit with error code
sys.exit(errcode)
@@ -439,7 +440,8 @@ class UploadClass:
sessstr = call(self.server.packages.login, self.username, self.password)
self.writeSession(sessstr)
- def _processFile(self, filename, relativeDir=None, source=None, nosig=None):
+ @staticmethod
+ def _processFile(filename, relativeDir=None, source=None, nosig=None):
""" Processes a file
Returns a hash containing:
header
commit 416d814fb9d9a8fb14c79973a74e4293451d1e5a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 16:59:08 2012 +0200
disabled false warnings UploadClass.packages: Attribute 'files' defined outside __init__ UploadClass.setChannels: Attribute 'channels' defined outside __init__ UploadClass.setForce: Attribute 'force' defined outside __init__ UploadClass.setURL: Attribute 'url' defined outside __init__ UploadClass.setOrg: Attribute 'orgId' defined outside __init__ UploadClass.setRelativeDir: Attribute 'relativeDir' defined outside __init__
diff --git a/client/tools/rhnpush/rhnpush.py b/client/tools/rhnpush/rhnpush.py
index 078d22f..97abd03 100755
--- a/client/tools/rhnpush/rhnpush.py
+++ b/client/tools/rhnpush/rhnpush.py
@@ -150,7 +150,7 @@ def main():
return 1
class UploadClass(uploadLib.UploadClass):
- # pylint: disable=E1101
+ # pylint: disable=E1101,W0201
def __init__(self, options, files=None):
uploadLib.UploadClass.__init__(self, options, files)
self.url_v2 = None
commit ea1a311408341ac5436b5151e583b62a74053ea9
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 16:31:01 2012 +0200
disabled warning No exception type(s) specified
diff --git a/client/tools/rhnpush/rhnpush.py b/client/tools/rhnpush/rhnpush.py
index 5e5131f..078d22f 100755
--- a/client/tools/rhnpush/rhnpush.py
+++ b/client/tools/rhnpush/rhnpush.py
@@ -199,6 +199,7 @@ class UploadClass(uploadLib.UploadClass):
def setChannels(self):
self.channels = self.options.channel or []
+ # pylint: disable=W0702
def _test_force(self):
test_force_str = "Setting force flag: %s"
test_force = "Passed"
commit 8ec80d100e290c6461cd8bd1e05ff1b863e60fb9
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 16:29:44 2012 +0200
fixed UploadClass.packages: Unused variable 'a' UploadClass.packages: Unused variable 't' UploadClass.check_package_exists: Unused variable 'e'
diff --git a/client/tools/rhnpush/rhnpush.py b/client/tools/rhnpush/rhnpush.py
index 5366a93..5e5131f 100755
--- a/client/tools/rhnpush/rhnpush.py
+++ b/client/tools/rhnpush/rhnpush.py
@@ -373,7 +373,7 @@ class UploadClass(uploadLib.UploadClass):
self.warn(0, msg)
continue
- for t in range(0, tries):
+ for _t in range(0, tries):
try:
ret = self.package(pkg, checksum_type, checksum)
if ret is None:
@@ -392,7 +392,7 @@ class UploadClass(uploadLib.UploadClass):
if not self.options.tolerant:
self.die(1, ue)
self.warn(2, ue)
- except AuthenticationRequired, a:
+ except AuthenticationRequired:
#session expired so we re-authenticate for the process to complete
#this uses the username and password from memory if available
#else it prompts for one.
@@ -460,7 +460,7 @@ class UploadClass(uploadLib.UploadClass):
a_pkg = package_from_filename(pkg)
a_pkg.read_header()
a_pkg.payload_checksum()
- except InvalidPackageError, e:
+ except InvalidPackageError:
if not self.options.tolerant:
self.die(-1, "ERROR: %s: This file doesn't appear to be a package" % pkg)
self.warn(2, "ERROR: %s: This file doesn't appear to be a package" % pkg)
commit bd54efb2d6ac42ffbc3547e547d0f86c92f80154
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 16:28:14 2012 +0200
fixed Unused import struct, re
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index 9bdf5b5..ec47579 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -15,12 +15,10 @@
# system imports
import os
-import re
import sys
import fnmatch
import getpass
import rhnpush_cache
-import struct
import xmlrpclib
from spacewalk.common import rhn_mpm
from spacewalk.common.rhn_pkg import package_from_filename, get_package_header
commit 2322702b1b60bcfd5b489046dd08510d6e6bc025
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 16:26:08 2012 +0200
fixed UploadClass.setCount: Attribute 'count' defined outside __init__ UploadClass.setServer: Attribute 'server' defined outside __init__ UploadClass.writeSession: Attribute 'session' defined outside __init__ UploadClass.setOrg: Attribute 'orgId' defined outside __init__
diff --git a/client/tools/rhnpush/uploadLib.py b/client/tools/rhnpush/uploadLib.py
index 8d87aaa..9bdf5b5 100644
--- a/client/tools/rhnpush/uploadLib.py
+++ b/client/tools/rhnpush/uploadLib.py
@@ -69,6 +69,10 @@ class UploadClass:
self.new_sat = None
self.url = None
self.channels = None
+ self.count = None
+ self.server = None
+ self.session = None
+ self.orgId = None
def warn(self, verbose, *args):
if self.options.verbose >= verbose:
commit cd83eaa61e1ecd202f689eb74a2541117f727509
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 16:23:12 2012 +0200
fixed Unused import getFileChecksum
diff --git a/client/tools/rhnpush/rhnpush.py b/client/tools/rhnpush/rhnpush.py
index eb65b47..5366a93 100755
--- a/client/tools/rhnpush/rhnpush.py
+++ b/client/tools/rhnpush/rhnpush.py
@@ -39,7 +39,6 @@ from rhn.connections import idn_ascii_to_pune
from optparse import Option, OptionParser
from rhn import rpclib
-from spacewalk.common.checksum import getFileChecksum
from spacewalk.common.rhn_pkg import InvalidPackageError, package_from_filename
import uploadLib
import rhnpush_v2
commit 695ed310bbd5d7cd4588239096767e303ccd6399
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 16:21:57 2012 +0200
fixed Class has no __init__ method Attribute 'url_v2' defined outside __init__ Attribute 'ping_status' defined outside __init__
diff --git a/client/tools/rhnpush/rhnpush.py b/client/tools/rhnpush/rhnpush.py
index c8041c0..eb65b47 100755
--- a/client/tools/rhnpush/rhnpush.py
+++ b/client/tools/rhnpush/rhnpush.py
@@ -152,6 +152,10 @@ def main():
class UploadClass(uploadLib.UploadClass):
# pylint: disable=E1101
+ def __init__(self, options, files=None):
+ uploadLib.UploadClass.__init__(self, options, files)
+ self.url_v2 = None
+
def setURL(self):
server = idn_ascii_to_pune(self.options.server)
if server is None:
@@ -302,8 +306,8 @@ class UploadClass(uploadLib.UploadClass):
#ping the server for status
self.warn(2, "url is", self.url_v2)
ping = rhnpush_v2.PingPackageUpload(self.url_v2, self.options.proxy)
- self.ping_status, errmsg, headerinfo = ping.ping()
- self.warn(2, "Result codes:", self.ping_status, errmsg)
+ ping_status, errmsg, headerinfo = ping.ping()
+ self.warn(2, "Result codes:", ping_status, errmsg)
# move patch clusters to the end because all the patches in the cluster
commit 82ada619ca9c962cc408e7f691628aade2711316
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 16:15:58 2012 +0200
fixed UploadClass.package: Invalid name "FileChecksumType" (should match [a-z_][a-zA-Z0-9_]{,30}$)
diff --git a/client/tools/rhnpush/rhnpush.py b/client/tools/rhnpush/rhnpush.py
index 0f02507..c8041c0 100755
--- a/client/tools/rhnpush/rhnpush.py
+++ b/client/tools/rhnpush/rhnpush.py
@@ -528,7 +528,7 @@ class UploadClass(uploadLib.UploadClass):
return (checksum_data, pkg_hash, digest_hash)
- def package(self, package, FileChecksumType, FileChecksum):
+ def package(self, package, fileChecksumType, fileChecksum):
self.warn(1, "Uploading package %s" % package)
if not os.access(package, os.R_OK):
self.die(-1, "Could not read file %s" % package)
@@ -550,7 +550,7 @@ class UploadClass(uploadLib.UploadClass):
raise uploadLib.UploadError("ERROR: %s: unsigned rpm (use --nosig to force)"% package)
try:
- ret = self._push_package_v2(package, FileChecksumType, FileChecksum)
+ ret = self._push_package_v2(package, fileChecksumType, fileChecksum)
except uploadLib.UploadError, e:
ret, diff_level, pdict = e.args[:3]
severities = {
@@ -578,7 +578,7 @@ class UploadClass(uploadLib.UploadClass):
return ret
- def _push_package_v2(self, package, FileChecksumType, FileChecksum):
+ def _push_package_v2(self, package, fileChecksumType, fileChecksum):
self.warn(1, "Using POST request")
pu = rhnpush_v2.PackageUpload(self.url_v2, self.options.proxy)
@@ -586,7 +586,7 @@ class UploadClass(uploadLib.UploadClass):
pu.set_force(self.options.force)
pu.set_null_org(self.options.nullorg)
- status, msgstr = pu.upload(package, FileChecksumType, FileChecksum)
+ status, msgstr = pu.upload(package, fileChecksumType, fileChecksum)
ret = {}
for tag in ('name', 'version', 'release', 'epoch', 'arch'):
@@ -595,8 +595,8 @@ class UploadClass(uploadLib.UploadClass):
val = ''
ret[tag] = val
- ret['checksum_type'] = FileChecksumType
- ret['checksum'] = FileChecksum
+ ret['checksum_type'] = fileChecksumType
+ ret['checksum'] = fileChecksum
if status == 400:
# Bad request - something bad happened
try:
commit a2f10f015af6c7574386ebf38f9752d2cff380f4
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 16:07:55 2012 +0200
disabled error Instance of 'rhnpushConfigParser' has no 'usage' member Instance of 'rhnpushConfigParser' has no 'list' member Instance of 'UploadClass' has no 'die' member Instance of 'UploadClass' has no 'list' member Instance of 'rhnpushConfigParser' has no 'dir' member Instance of 'rhnpushConfigParser' has no 'stdin' member Instance of 'UploadClass' has no 'directory' member Instance of 'rhnpushConfigParser' has no 'stdin' member Instance of 'rhnpushConfigParser' has no 'dir' member Instance of 'UploadClass' has no 'readStdin' member Instance of 'rhnpushConfigParser' has no 'dir' member Instance of 'rhnpushConfigParser' has no 'stdin' member Instance of 'UploadClass' has no 'readStdin' member Instance of 'UploadClass' has no 'directory' member Instance of 'UploadClass' has no 'filter_excludes' member Instance of 'rhnpushConfigParser' has no 'newest' member Instance of 'UploadClass' has no 'die' member Instance of 'UploadClass' has no 'newest' member Instance of 'Upload
Class' has no 'newest' member Instance of 'rhnpushConfigParser' has no 'test' member Instance of 'UploadClass' has no 'test' member Instance of 'rhnpushConfigParser' has no 'extended_test' member Instance of 'rhnpushConfigParser' has no 'header' member Instance of 'UploadClass' has no 'uploadHeaders' member UploadClass.setURL: Instance of 'UploadClass' has no 'options' member UploadClass.setURL: Instance of 'UploadClass' has no 'die' member UploadClass.setURL: Instance of 'UploadClass' has no 'die' member UploadClass.setURL: Instance of 'UploadClass' has no 'die' member UploadClass.setOrg: Instance of 'UploadClass' has no 'options' member UploadClass.setOrg: Instance of 'UploadClass' has no 'options' member UploadClass.setOrg: Instance of 'UploadClass' has no 'die' member UploadClass.setOrg: Instance of 'UploadClass' has no 'options' member UploadClass._test_set_server: Instance of 'UploadClass' has no 'setServer' member UploadClass._test_connect: Instance of 'UploadClass' h
as no 'server' member UploadClass._test_connect: Instance of 'UploadClass' has no 'username' member UploadClass._test_connect: Instance of 'UploadClass' has no 'password' member UploadClass._test_access: Instance of 'UploadClass' has no 'server' member UploadClass._test_authenticate: Instance of 'UploadClass' has no 'authenticate' member UploadClass.extended_test: Instance of 'UploadClass' has no 'test' member UploadClass.packages: Instance of 'UploadClass' has no 'authenticate' member UploadClass.packages: Instance of 'UploadClass' has no 'warn' member UploadClass.packages: Instance of 'UploadClass' has no 'options' member
diff --git a/client/tools/rhnpush/rhnpush.py b/client/tools/rhnpush/rhnpush.py
index 64de711..0f02507 100755
--- a/client/tools/rhnpush/rhnpush.py
+++ b/client/tools/rhnpush/rhnpush.py
@@ -88,6 +88,7 @@ def main():
true_list = ['usage', 'test', 'source', 'header', 'nullorg', 'newest', \
'nosig', 'force', 'list', 'stdin', 'new_cache','extended_test', \
'no_session_caching', 'tolerant']
+ # pylint: disable=E1101,E1103
optionParser = OptionParser(option_list=optionsTable, usage="%prog [OPTION] [<package>]")
manager = rhnpush_confmanager.ConfManager(optionParser, true_list)
options = manager.get_config()
@@ -150,6 +151,7 @@ def main():
return 1
class UploadClass(uploadLib.UploadClass):
+ # pylint: disable=E1101
def setURL(self):
server = idn_ascii_to_pune(self.options.server)
if server is None:
commit 93dc659dcd0e664aa5ba379b0117ff975f988de6
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 16:01:59 2012 +0200
disabled warning Line too long (123/120)
diff --git a/client/tools/rhnpush/rhnpush.py b/client/tools/rhnpush/rhnpush.py
index 27beba7..64de711 100755
--- a/client/tools/rhnpush/rhnpush.py
+++ b/client/tools/rhnpush/rhnpush.py
@@ -52,6 +52,7 @@ RPMTAG_NOSOURCE = 1051
def main():
# Initialize a command-line processing object with a table of options
+ # pylint: disable=C0301
optionsTable = [
Option('-v','--verbose', action='count', help='Increase verbosity', default=0),
Option('-d','--dir', action='store', help='Process packages from this directory'),
@@ -81,6 +82,7 @@ def main():
Option( '--tolerant', action='store_true',
help='If rhnpush errors while uploading a package, continue uploading the rest of the packages.')
]
+ # pylint: enable=C0301
#Having to maintain a store_true list is ugly. I'm trying to get rid of this.
true_list = ['usage', 'test', 'source', 'header', 'nullorg', 'newest', \
@@ -356,7 +358,11 @@ class UploadClass(uploadLib.UploadClass):
if self.options.force:
self.warn(1, "Package checksum %s mismatch -- Forcing Upload" % pkg)
else:
- msg = """Error: Package %s already exists on the server with a different checksum. Skipping upload to prevent overwriting existing package. (You may use rhnpush with the --force option to force this upload if the force_upload option is enabled on your server.)\n"""% pkg
+ msg = "Error: Package %s already exists on the server with" \
+ " a different checksum. Skipping upload to prevent" \
+ " overwriting existing package. (You may use rhnpush with" \
+ " the --force option to force this upload if the" \
+ " force_upload option is enabled on your server.)\n" % pkg
if not self.options.tolerant:
self.die(-1, msg)
self.warn(0, msg)
@@ -499,19 +505,23 @@ class UploadClass(uploadLib.UploadClass):
# could have expired.Make sure its re-authenticated.
self.authenticate()
if uploadLib.exists_getPackageChecksumBySession(self.server):
- checksum_data = uploadLib.getPackageChecksumBySession(self.server, self.session.getSessionString(), info)
+ checksum_data = uploadLib.getPackageChecksumBySession(self.server,
+ self.session.getSessionString(), info)
else:
# old server only md5 capable
- checksum_data = uploadLib.getPackageMD5sumBySession(self.server, self.session.getSessionString(), info)
+ checksum_data = uploadLib.getPackageMD5sumBySession(self.server,
+ self.session.getSessionString(), info)
else:
# computing checksum and other info is expensive process and session
# could have expired.Make sure its re-authenticated.
self.authenticate()
if uploadLib.exists_getPackageChecksumBySession(self.server):
- checksum_data = uploadLib.getSourcePackageChecksumBySession(self.server, self.session.getSessionString(), info)
+ checksum_data = uploadLib.getSourcePackageChecksumBySession(self.server,
+ self.session.getSessionString(), info)
else:
# old server only md5 capable
- checksum_data = uploadLib.getSourcePackageMD5sumBySession(self.server, self.session.getSessionString(), info)
+ checksum_data = uploadLib.getSourcePackageMD5sumBySession(self.server,
+ self.session.getSessionString(), info)
return (checksum_data, pkg_hash, digest_hash)
commit a94ca797226da36066e5a554b16bdb4945ef5e11
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 15:58:16 2012 +0200
disabled warning _run: Catch "Exception"
diff --git a/client/tools/rhnpush/solaris2mpm.py b/client/tools/rhnpush/solaris2mpm.py
index 1d53bbb..7387a64 100644
--- a/client/tools/rhnpush/solaris2mpm.py
+++ b/client/tools/rhnpush/solaris2mpm.py
@@ -219,6 +219,7 @@ def _run(archives=sys.argv[1:]):
else:
raise MPMInputError("'%s' does not appear to contain Solaris content")
+ # pylint: disable=W0703
except Exception, e:
print "Error creating mpm for %s: %s" % (archive, repr(e))
commit 7884b2f3e44cbb0913153f33dd10dc7828e535cf
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 15:57:19 2012 +0200
disabled warning create_patch_mpm: Too many statements (54/50)
diff --git a/client/tools/rhnpush/solaris2mpm.py b/client/tools/rhnpush/solaris2mpm.py
index ba9566e..1d53bbb 100644
--- a/client/tools/rhnpush/solaris2mpm.py
+++ b/client/tools/rhnpush/solaris2mpm.py
@@ -321,6 +321,7 @@ def create_patch_set_mpm(archive_parser, archive):
def create_patch_mpm(archive_parser, prefix="", archive=""):
"""Create an mpm package from a parser holding a patch archive"""
+ # pylint: disable=R0915
# have to have one or the other
assert prefix or archive
commit 9a64fc522111c0da80e3a2c37d701e10f711495a
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 15:54:52 2012 +0200
disabled warning Access to a protected member _archive_dir of a client class
diff --git a/client/tools/rhnpush/solaris2mpm.py b/client/tools/rhnpush/solaris2mpm.py
index 8216aad..ba9566e 100644
--- a/client/tools/rhnpush/solaris2mpm.py
+++ b/client/tools/rhnpush/solaris2mpm.py
@@ -231,6 +231,7 @@ def _run(archives=sys.argv[1:]):
# archive tests ----------------------------------------------------------
# This is not a good way to do this, but it will suffice for now.
+# pylint: disable=W0212
def _close_mpm(mpm):
if hasattr(mpm, "payload_stream") and mpm.payload_stream:
mpm.payload_stream.close()
commit 696f9c20d223d2a6b2e01af2cac3c1965448c018
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 15:47:36 2012 +0200
fixed _to_db_timestamp: Using possibly undefined loop variable 'i'
diff --git a/client/tools/rhnpush/solaris2mpm.py b/client/tools/rhnpush/solaris2mpm.py
index 691f964..8216aad 100644
--- a/client/tools/rhnpush/solaris2mpm.py
+++ b/client/tools/rhnpush/solaris2mpm.py
@@ -1016,9 +1016,9 @@ def _to_db_timestamp(s):
for i in range(len(_months)):
if m == _months[i]:
break
- else:
- raise Exception("unknown month %s" % arr[0]), None, sys.exc_info()[2]
- m = i + 1
+ else:
+ raise Exception("unknown month %s" % arr[0]), None, sys.exc_info()[2]
+ m = i + 1
d = int(d)
y = int(y)
commit b6f7c7d45dbd25229511b46e975bae47fe1c4664
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 15:42:56 2012 +0200
fixed More than one statement on a single line
diff --git a/client/tools/rhnpush/solaris2mpm.py b/client/tools/rhnpush/solaris2mpm.py
index d4c8b5b..691f964 100644
--- a/client/tools/rhnpush/solaris2mpm.py
+++ b/client/tools/rhnpush/solaris2mpm.py
@@ -862,7 +862,8 @@ def _unique_list_of_dicts(list_):
def write_mpm(mpm):
"""Write out the mpm file"""
- if mpm is None: return
+ if mpm is None:
+ return
dest = _compute_filename(mpm.header)
print "Writing %s" % dest
commit f2a47686fa75c8b5bc0836c9acd2183411039871
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 15:42:04 2012 +0200
fixed Operator not preceded by a space
diff --git a/client/tools/rhnpush/solaris2mpm.py b/client/tools/rhnpush/solaris2mpm.py
index 5ac7054..d4c8b5b 100644
--- a/client/tools/rhnpush/solaris2mpm.py
+++ b/client/tools/rhnpush/solaris2mpm.py
@@ -852,7 +852,7 @@ def _unique_list_of_dicts(list_):
if list_[i] == list_[i+1]:
del list_[i]
continue
- i+=1
+ i += 1
return list_
commit 7f3ab0960c901c128b679b37a1b5cc61d7d1acff
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 15:36:16 2012 +0200
fixed Unused variable 'x' Unused variable 'pspe' Unused variable 'sect_dict'
diff --git a/client/tools/rhnpush/solaris2mpm.py b/client/tools/rhnpush/solaris2mpm.py
index d2d387e..5ac7054 100644
--- a/client/tools/rhnpush/solaris2mpm.py
+++ b/client/tools/rhnpush/solaris2mpm.py
@@ -192,9 +192,9 @@ def _run(archives=sys.argv[1:]):
set_mpm = create_patch_set_mpm(archive_parser, archive)
write_mpm(set_mpm)
# create the individual patch mpms
- patches, x = archive_parser.list()
+ patches, _dummy = archive_parser.list()
if patches == ['patches']:
- patches, x = archive_parser.list('patches/')
+ patches, _dummy = archive_parser.list('patches/')
for dirname in patches:
patch_mpm = create_patch_mpm(archive_parser, prefix=dirname)
write_mpm(patch_mpm)
@@ -208,7 +208,7 @@ def _run(archives=sys.argv[1:]):
# package
elif _is_package_archive(archive_parser):
- pkgs, x = archive_parser.list()
+ pkgs, _dummy = archive_parser.list()
for dirname in pkgs:
pkg_mpm = create_pkg_mpm(archive_parser, prefix=dirname)
write_mpm(pkg_mpm)
@@ -359,7 +359,7 @@ def create_patch_mpm(archive_parser, prefix="", archive=""):
# recent format has files in patches subdir
if os.path.isdir(os.path.join(archive_parser._archive_dir, patch_path_with_subdir)):
patch_path = patch_path_with_subdir
- pkgs, x = archive_parser.list(patch_path)
+ pkgs, _dummy = archive_parser.list(patch_path)
for pkg in pkgs:
pkginfo_file = os.path.join(prefix, pkg, 'pkginfo')
@@ -468,7 +468,7 @@ def parse_pkginfo(pkginfo_str):
"PSTAMP=": "pstamp",
"VENDOR=": "vendor" }
- parse_dict, x = parser(lines, trans_dict.keys(), "=")
+ parse_dict, _dummy = parser(lines, trans_dict.keys(), "=")
dct = _translate_dict(trans_dict, parse_dict)
@@ -512,7 +512,7 @@ def compose_pstamp_and_release(header):
try:
pstamp = _extract_pstamp_as_release(header['pstamp'])
pstamp_part = delimiter + pstamp
- except PStampParseException, pspe:
+ except PStampParseException:
# Could not convert the pstamp into a release number. Just use
# the raw string.
pstamp = header['pstamp']
@@ -661,7 +661,7 @@ def parse_cluster_readme(readme_string):
"DATE:": "date",
"CLUSTER DESCRIPTION": "description" }
- parse_dict, x = parser(lines, trans_dict.keys(), ":")
+ parse_dict, _dummy = parser(lines, trans_dict.keys(), ":")
dct = _translate_dict(trans_dict, parse_dict)
# munge some fields
@@ -683,7 +683,7 @@ def parse_patch_readme(readme_string):
"SunOS Release:": "sunos_rel",
"Relevant Architectures:": "target_arch" }
- parse_dict, x = parser(lines, trans_dict.keys(), ":")
+ parse_dict, _dummy = parser(lines, trans_dict.keys(), ":")
dct = _translate_dict(trans_dict, parse_dict)
# Munge munge munge
@@ -706,7 +706,7 @@ def parse_patchinfo(patchinfo_string):
"PATCH_INCOMPAT=": "conflicts",
"PATCH_OBSOLETES=": "obsoletes" }
- parse_dict, x = parser(lines, trans_dict.keys(), "=")
+ parse_dict, _dummy = parser(lines, trans_dict.keys(), "=")
dct = _translate_dict(trans_dict, parse_dict)
@@ -748,7 +748,7 @@ def parse_patch_pkginfo(pkginfo_string):
"SUNW_REQUIRES=": "requires",
"SUNW_INCOMPAT=": "conflicts" }
- parse_dict, x = parser(lines, trans_dict.keys(), "=")
+ parse_dict, _dummy = parser(lines, trans_dict.keys(), "=")
dct = _translate_dict(trans_dict, parse_dict)
@@ -1039,7 +1039,6 @@ def parser(lines, sections, delim):
"""
resp = {}
- sect_dict = {}
section = None
content = []
commit 4202d82c538f9b1840c8873a0ca16d2c06230078
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 15:34:06 2012 +0200
reused checksum.getFileChecksum()
fixing hashlib: Class has no __init__ method
diff --git a/client/tools/rhnpush/solaris2mpm.py b/client/tools/rhnpush/solaris2mpm.py
index c11f68f..d2d387e 100644
--- a/client/tools/rhnpush/solaris2mpm.py
+++ b/client/tools/rhnpush/solaris2mpm.py
@@ -22,21 +22,7 @@ import socket
import sys
import time
-try:
- import hashlib
-except ImportError:
- import md5
- class hashlib:
- @staticmethod
- def new(checksum):
- # Add sha1 if needed.
- if checksum == 'md5':
- return md5.new()
- # if not md5 or sha1, its invalid
- if checksum not in ['md5', 'sha1']:
- raise ValueError, "Incompatible checksum type"
-
-from spacewalk.common import rhn_mpm
+from spacewalk.common import rhn_mpm, checksum
from archive import get_archive_parser
@@ -663,17 +649,7 @@ def provide_self(header):
def md5sum_for_stream(data_stream):
"""Calcualte the md5sum for a datastream and return it in a utf8 friendly
format"""
-
- md5obj = hashlib.new('md5')
- while True:
- buf = data_stream.read(1024000)
- if buf:
- md5obj.update(buf)
- else:
- break
- data_stream.seek(0)
-
- return md5obj.hexdigest()
+ return checksum.getFileChecksum('md5', file_obj=data_stream)
# patch set mpm creation -------------------------------------------------
commit afffdbecbe1aed27c99e6842696219cac52616ac
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 15:29:41 2012 +0200
fixed Line too long (136/120)
diff --git a/client/tools/rhnpush/solaris2mpm.py b/client/tools/rhnpush/solaris2mpm.py
index 6a27804..c11f68f 100644
--- a/client/tools/rhnpush/solaris2mpm.py
+++ b/client/tools/rhnpush/solaris2mpm.py
@@ -657,7 +657,8 @@ def provide_self(header):
header['provides'].insert(0, dct)
if header.has_key('release'):
- header['provides'].insert(1, { 'name' : dct['name'], 'flags' : 8, 'version' : "%s-%s" % (header['version'], header['release'])})
+ header['provides'].insert(1, { 'name' : dct['name'], 'flags' : 8,
+ 'version' : "%s-%s" % (header['version'], header['release'])})
def md5sum_for_stream(data_stream):
"""Calcualte the md5sum for a datastream and return it in a utf8 friendly
commit 0320632394306efa796363c6237b4b46cbcf3c1e
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 14:58:40 2012 +0200
fixed PackageUpload.encode_values: Method could be a function
diff --git a/client/tools/rhnpush/rhnpush_v2.py b/client/tools/rhnpush/rhnpush_v2.py
index d43606f..2fdbd85 100644
--- a/client/tools/rhnpush/rhnpush_v2.py
+++ b/client/tools/rhnpush/rhnpush_v2.py
@@ -43,7 +43,8 @@ class PackageUpload(connection.PackageUpload):
self.headers["%s-%s" % (self.header_prefix, "Null-Org")] = "1"
# Encodes an array of variables into Base64 (column-separated)
- def encode_values(self, arr):
+ @staticmethod
+ def encode_values(arr):
val = ':'.join(map(lambda x: x.strip(), map(base64.encodestring, arr)))
# Get rid of the newlines
val = val.replace('\n', '')
commit 429c843210ede3188f6a281109bba97c29538bc7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 14:56:53 2012 +0200
disabled warning class1: Too few public methods (0/1)
diff --git a/client/tools/rhnpush/utils.py b/client/tools/rhnpush/utils.py
index e953a4a..ed4e835 100644
--- a/client/tools/rhnpush/utils.py
+++ b/client/tools/rhnpush/utils.py
@@ -49,6 +49,7 @@ def make_common_attr_equal(object1, object2):
if __name__ == "__main__":
#This is just for testing purposes.
+# pylint: disable=R0903
class class1:
def __init__(self):
self.a = "aaaa"
commit e07074d3ae9e0304077b5a58561bf092e0f190c8
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 14:53:38 2012 +0200
disable warning Access to a protected member _read_conf ig_files of a client class Instance of 'rhnpushConfigParser' has no 'usage' member Instance of 'rhnpushConfigParser' has no 'usage' member RhnConfigTestCase: Too many public methods (22/20)
diff --git a/client/tools/rhnpush/test/testRhnpushConfig.py b/client/tools/rhnpush/test/testRhnpushConfig.py
index dc3ad1f..71c442f 100644
--- a/client/tools/rhnpush/test/testRhnpushConfig.py
+++ b/client/tools/rhnpush/test/testRhnpushConfig.py
@@ -17,6 +17,7 @@ import rhnpush_config
import unittest
+# pylint: disable=W0212,E1101,R0904
class RhnConfigTestCase(unittest.TestCase):
def setUp(self):
self.userconfig = rhnpush_config.rhnpushConfigParser('.rhnpushrc')
commit c7011c3744b2458fa394ccfee41ce97dc869cc71
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 14:49:47 2012 +0200
disabled warning ArchiveTest.testInstantiation: Method could be a function ArchiveTest.testFind: Method could be a function ArchiveTest.testFindPath: Method could be a function ArchiveTest.testRead: Method could be a function
diff --git a/client/tools/rhnpush/test/test_archive.py b/client/tools/rhnpush/test/test_archive.py
index cf4a68a..88b64c1 100644
--- a/client/tools/rhnpush/test/test_archive.py
+++ b/client/tools/rhnpush/test/test_archive.py
@@ -63,22 +63,26 @@ class ArchiveTest(unittest.TestCase):
# test methods -------------------------------------------------------
- def testInstantiation(self):
+ @staticmethod
+ def testInstantiation():
"test the instantiation of an archive parser object"
p = archive.get_archive_parser(TEST_ARCHIVE)
assert isinstance(p, archive.ArchiveParser)
- def testFind(self):
+ @staticmethod
+ def testFind():
"test the ability of the parser to find a file in the archive"
p = archive.get_archive_parser(TEST_ARCHIVE)
assert p.contains(TEST_FILE)
- def testFindPath(self):
+ @staticmethod
+ def testFindPath():
"test the ability of the parser to find a subpath in the archive"
p = archive.get_archive_parser(TEST_ARCHIVE)
assert p.contains("foo/bar/" + TEST_FILE)
- def testRead(self):
+ @staticmethod
+ def testRead():
"test the ability of the parser to read a file in the archive"
p = archive.get_archive_parser(TEST_ARCHIVE)
contents = p.read(TEST_FILE)
commit 5b5f8278154602afea5c637e4a5e9992ae7cba87
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 14:41:52 2012 +0200
disabled warning UtilsTestCase.testMakeCommonAttrEqual: Access to a protected member _d of a client class
diff --git a/client/tools/rhnpush/test/testUtils.py b/client/tools/rhnpush/test/testUtils.py
index 305b150..cbdf765 100644
--- a/client/tools/rhnpush/test/testUtils.py
+++ b/client/tools/rhnpush/test/testUtils.py
@@ -60,6 +60,7 @@ class UtilsTestCase(unittest.TestCase):
self.obj1 = None
self.obj2 = None
+ # pylint: disable=W0212
def testMakeCommonAttrEqual(self):
self.obj1, self.obj2 = utils.make_common_attr_equal(self.obj1, self.obj2)
assert (self.obj1._d == '1'
commit 73cf6f1ab6f47fb0f344cba9ceef38624fcf322c
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 14:41:11 2012 +0200
fixed UtilsTestCase.testAttrNotFunction: Module 'utils' has no 'attr_not_function' member
diff --git a/client/tools/rhnpush/test/testUtils.py b/client/tools/rhnpush/test/testUtils.py
index 3113c3e..305b150 100644
--- a/client/tools/rhnpush/test/testUtils.py
+++ b/client/tools/rhnpush/test/testUtils.py
@@ -69,8 +69,5 @@ class UtilsTestCase(unittest.TestCase):
and self.obj1.c == 6
and self.obj2.f == 'aaa')
- def testAttrNotFunction(self):
- assert utils.attr_not_function(self.obj1.__dict__['a']) == True
-
if __name__ == "__main__":
unittest.main()
commit 810ff28b121ea0ab223159928dce8995ac1b82f2
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 14:36:55 2012 +0200
fixed TestObj1._private_function: Method could be a function TestObj1.public_function: Method could be a function TestObj2._private_function: Method could be a function TestObj2.public_function: Method could be a function
diff --git a/client/tools/rhnpush/test/testUtils.py b/client/tools/rhnpush/test/testUtils.py
index fb929ff..3113c3e 100644
--- a/client/tools/rhnpush/test/testUtils.py
+++ b/client/tools/rhnpush/test/testUtils.py
@@ -24,10 +24,12 @@ class TestObj1:
self._d = '1'
self._e = '2'
- def _private_function(self):
+ @staticmethod
+ def _private_function():
print "This is privatei to TestObj1 instances"
- def public_function(self):
+ @staticmethod
+ def public_function():
print "This is public and belongs to TestObj1"
class TestObj2:
@@ -39,10 +41,12 @@ class TestObj2:
self._e = '5'
self.f = 'aaa'
- def _private_function(self):
+ @staticmethod
+ def _private_function():
print "This is private to TestObj2 instances"
- def public_function(self):
+ @staticmethod
+ def public_function():
print "This is public and belongs to TestObj2"
commit 6c40d145b1471c61bc9dddec81c33db521081cff
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 14:35:53 2012 +0200
fixed Line too long (146/120)
diff --git a/client/tools/rhnpush/test/testUtils.py b/client/tools/rhnpush/test/testUtils.py
index 177168b..fb929ff 100644
--- a/client/tools/rhnpush/test/testUtils.py
+++ b/client/tools/rhnpush/test/testUtils.py
@@ -58,7 +58,12 @@ class UtilsTestCase(unittest.TestCase):
def testMakeCommonAttrEqual(self):
self.obj1, self.obj2 = utils.make_common_attr_equal(self.obj1, self.obj2)
- assert self.obj1._d == '1' and self.obj2._d == '4' and self.obj1.a == 4 and self.obj1.b == 5 and self.obj1.c == 6 and self.obj2.f == 'aaa'
+ assert (self.obj1._d == '1'
+ and self.obj2._d == '4'
+ and self.obj1.a == 4
+ and self.obj1.b == 5
+ and self.obj1.c == 6
+ and self.obj2.f == 'aaa')
def testAttrNotFunction(self):
assert utils.attr_not_function(self.obj1.__dict__['a']) == True
commit ff25f88f9d19fc48551db7409e49a8e2db5d76d2
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 14:26:54 2012 +0200
disabled error ConfManager.get_config: Instance of 'list' has no 'split' member
diff --git a/client/tools/rhnpush/rhnpush_confmanager.py b/client/tools/rhnpush/rhnpush_confmanager.py
index d67257b..c5ae0c3 100644
--- a/client/tools/rhnpush/rhnpush_confmanager.py
+++ b/client/tools/rhnpush/rhnpush_confmanager.py
@@ -64,6 +64,7 @@ class ConfManager:
self._files_to_list()
#Change the channel string into a list of strings.
+ # pylint: disable=E1103
if not self.defaultconfig.channel:
#if no channel then make it null array instead of
#an empty string array from of size 1 [''] .
commit 73a918d909d1804a43f7773b6d0b4d7cb0464ac3
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 14:25:25 2012 +0200
fixed ConfManager._zero_to_none: Method could be a function
diff --git a/client/tools/rhnpush/rhnpush_confmanager.py b/client/tools/rhnpush/rhnpush_confmanager.py
index 2324981..d67257b 100644
--- a/client/tools/rhnpush/rhnpush_confmanager.py
+++ b/client/tools/rhnpush/rhnpush_confmanager.py
@@ -52,12 +52,6 @@ class ConfManager:
#Changes every option in config that is also in store_true_list that is set to '0' to None
- def _zero_to_none(self, config, store_true_list):
- for opt in config.keys():
- for cmd in store_true_list:
- if str(opt) == cmd and config.__dict__[opt] == '0':
- config.__dict__[opt] = None
-
def get_config(self):
for f in self.cfgFileList:
if os.access(f, os.F_OK):
@@ -82,7 +76,7 @@ class ConfManager:
argoptions, files = self.cmdconfig.parse_args()
#Makes self.defaultconfig compatible with argoptions by changing all '0' value attributes to None.
- self._zero_to_none(self.defaultconfig, self.store_true_list)
+ _zero_to_none(self.defaultconfig, self.store_true_list)
#If verbose isn't set at the command-line, it automatically gets set to zero. If it's at zero, change it to
#None so the settings in the config files take precedence.
@@ -110,4 +104,9 @@ class ConfManager:
self.defaultconfig.files = files
return self.defaultconfig
-
+
+def _zero_to_none(config, store_true_list):
+ for opt in config.keys():
+ for cmd in store_true_list:
+ if str(opt) == cmd and config.__dict__[opt] == '0':
+ config.__dict__[opt] = None
11 years, 8 months
satellite/install
by Tomas Lestach
satellite/install/install.pl | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit fece557850e45102472f4a8c0c8e7a1041f396bb
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Aug 24 11:24:46 2012 +0200
849101 - initialize proxyAccept if no http proxy information is in the up2date file
addressing:
Use of uninitialized value in string eq at ./install.pl line 325.
diff --git a/satellite/install/install.pl b/satellite/install/install.pl
index af4df85..d48726a 100755
--- a/satellite/install/install.pl
+++ b/satellite/install/install.pl
@@ -339,6 +339,8 @@ Proxy Password: Not displayed - see /etc/sysconfig/rhn/up2date:proxyPassword
Import values to be used by Satellite [y/n]",
-test => qr/\S+/,
-answer => \$proxyAccept);
+ } else {
+ $proxyAccept = 'n';
}
if ($proxyAccept eq 'y') {
$answers->{'rhn-http-proxy'} = $up2dateopts->{'httpProxy'};
11 years, 8 months
Changes to 'refs/tags/spacewalk-pylint-0.7-1'
by Miroslav Suchý
Tag 'spacewalk-pylint-0.7-1' created by Miroslav Suchý <msuchy(a)redhat.com> at 2012-08-24 16:11 +0000
Tagging package [spacewalk-pylint] version [0.7-1] in directory [spacewalk/pylint/].
Changes since spacewalk-pylint-0.6-1:
Miroslav Suchý (2):
put W1201 on list of ignored pylint warnings
Automatic commit of package [spacewalk-pylint] release [0.7-1].
---
rel-eng/packages/spacewalk-pylint | 2 +-
spacewalk/pylint/spacewalk-pylint.rc | 3 ++-
spacewalk/pylint/spacewalk-pylint.spec | 5 ++++-
3 files changed, 7 insertions(+), 3 deletions(-)
---
11 years, 8 months
satellite/install
by Tomas Lestach
satellite/install/install.pl | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 21f5cbfb5220906f77e0129df5267800f930c02b
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Fri Aug 24 11:24:46 2012 +0200
849101 - initialize proxyAccept if no http proxy information is in the up2date file
addressing:
Use of uninitialized value in string eq at ./install.pl line 325.
diff --git a/satellite/install/install.pl b/satellite/install/install.pl
index af4df85..d48726a 100755
--- a/satellite/install/install.pl
+++ b/satellite/install/install.pl
@@ -339,6 +339,8 @@ Proxy Password: Not displayed - see /etc/sysconfig/rhn/up2date:proxyPassword
Import values to be used by Satellite [y/n]",
-test => qr/\S+/,
-answer => \$proxyAccept);
+ } else {
+ $proxyAccept = 'n';
}
if ($proxyAccept eq 'y') {
$answers->{'rhn-http-proxy'} = $up2dateopts->{'httpProxy'};
11 years, 8 months
2 commits - rel-eng/packages spacewalk/pylint
by Miroslav Suchý
rel-eng/packages/spacewalk-pylint | 2 +-
spacewalk/pylint/spacewalk-pylint.rc | 3 ++-
spacewalk/pylint/spacewalk-pylint.spec | 5 ++++-
3 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit b57d86c853a0cdfdbe722bccddfaba19ee574579
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 24 18:11:27 2012 +0200
Automatic commit of package [spacewalk-pylint] release [0.7-1].
diff --git a/rel-eng/packages/spacewalk-pylint b/rel-eng/packages/spacewalk-pylint
index 09900cb..c3b1ac0 100644
--- a/rel-eng/packages/spacewalk-pylint
+++ b/rel-eng/packages/spacewalk-pylint
@@ -1 +1 @@
-0.6-1 spacewalk/pylint/
+0.7-1 spacewalk/pylint/
diff --git a/spacewalk/pylint/spacewalk-pylint.spec b/spacewalk/pylint/spacewalk-pylint.spec
index 624b7b6..7549b0c 100644
--- a/spacewalk/pylint/spacewalk-pylint.spec
+++ b/spacewalk/pylint/spacewalk-pylint.spec
@@ -1,5 +1,5 @@
Name: spacewalk-pylint
-Version: 0.6
+Version: 0.7
Release: 1%{?dist}
Summary: Pylint configuration for spacewalk python packages
@@ -49,6 +49,9 @@ rm -rf %{buildroot}
%doc LICENSE
%changelog
+* Fri Aug 24 2012 Miroslav Suchý <msuchy(a)redhat.com> 0.7-1
+- put W1201 on list of ignored pylint warnings
+
* Fri Aug 24 2012 Michael Mraka <michael.mraka(a)redhat.com> 0.6-1
- let's silence pylint on our large modules and objects
commit 73f85b6a6f29b8e00d0dba197b0e1c0856483e5f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Fri Aug 24 18:10:55 2012 +0200
put W1201 on list of ignored pylint warnings
diff --git a/spacewalk/pylint/spacewalk-pylint.rc b/spacewalk/pylint/spacewalk-pylint.rc
index 990c8e6..7408778 100644
--- a/spacewalk/pylint/spacewalk-pylint.rc
+++ b/spacewalk/pylint/spacewalk-pylint.rc
@@ -12,7 +12,7 @@ persistent=no
[MESSAGES CONTROL]
# Disable the message(s) with the given id(s).
-disable=I0011,C0302,C0111,R0801,R0902,R0904,R0912,R0913,R0914,R0915,W0142,W0403,W0603
+disable=I0011,C0302,C0111,R0801,R0902,R0904,R0912,R0913,R0914,R0915,W0142,W0403,W0603,W1201
# list of disabled messages:
#I0011: 62: Locally disabling R0201
@@ -27,6 +27,7 @@ disable=I0011,C0302,C0111,R0801,R0902,R0904,R0912,R0913,R0914,R0915,W0142,W0403,
#W0142:228:MPM_Package.write: Used * or ** magic
#W0403: 28: Relative import 'rhnLog', should be 'backend.common.rhnLog'
#W0603: 72:initLOG: Using the global statement
+#W1201: 49,12:KatelloShell.history_file: Specify string format arguments as logging function parameters
[REPORTS]
11 years, 8 months
Changes to 'refs/tags/spacewalk-pylint-0.6-1'
by Michael Mraka
Tag 'spacewalk-pylint-0.6-1' created by Michael Mraka <michael.mraka(a)redhat.com> at 2012-08-24 15:01 +0000
Tagging package [spacewalk-pylint] version [0.6-1] in directory [spacewalk/pylint/].
Changes since spacewalk-java-1.8.133-1:
Michael Mraka (2):
let's silence pylint on our large modules and objects
Automatic commit of package [spacewalk-pylint] release [0.6-1].
---
rel-eng/packages/spacewalk-pylint | 2 +-
spacewalk/pylint/spacewalk-pylint.rc | 9 ++++++++-
spacewalk/pylint/spacewalk-pylint.spec | 5 ++++-
3 files changed, 13 insertions(+), 3 deletions(-)
---
11 years, 8 months
2 commits - rel-eng/packages spacewalk/pylint
by Michael Mraka
rel-eng/packages/spacewalk-pylint | 2 +-
spacewalk/pylint/spacewalk-pylint.rc | 9 ++++++++-
spacewalk/pylint/spacewalk-pylint.spec | 5 ++++-
3 files changed, 13 insertions(+), 3 deletions(-)
New commits:
commit 23fecfb9ff733b04a4999f5ffcdd21d72f527be1
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 17:01:53 2012 +0200
Automatic commit of package [spacewalk-pylint] release [0.6-1].
diff --git a/rel-eng/packages/spacewalk-pylint b/rel-eng/packages/spacewalk-pylint
index fff5b51..09900cb 100644
--- a/rel-eng/packages/spacewalk-pylint
+++ b/rel-eng/packages/spacewalk-pylint
@@ -1 +1 @@
-0.5-1 spacewalk/pylint/
+0.6-1 spacewalk/pylint/
diff --git a/spacewalk/pylint/spacewalk-pylint.spec b/spacewalk/pylint/spacewalk-pylint.spec
index 289160b..624b7b6 100644
--- a/spacewalk/pylint/spacewalk-pylint.spec
+++ b/spacewalk/pylint/spacewalk-pylint.spec
@@ -1,5 +1,5 @@
Name: spacewalk-pylint
-Version: 0.5
+Version: 0.6
Release: 1%{?dist}
Summary: Pylint configuration for spacewalk python packages
@@ -49,6 +49,9 @@ rm -rf %{buildroot}
%doc LICENSE
%changelog
+* Fri Aug 24 2012 Michael Mraka <michael.mraka(a)redhat.com> 0.6-1
+- let's silence pylint on our large modules and objects
+
* Mon Jun 04 2012 Miroslav Suchý <msuchy(a)redhat.com> 0.5-1
- %%defattr is not needed since rpm 4.4 (msuchy(a)redhat.com)
commit 7340b40ddb08340fefb66aec3aaa441ccf598efb
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Fri Aug 24 16:16:30 2012 +0200
let's silence pylint on our large modules and objects
diff --git a/spacewalk/pylint/spacewalk-pylint.rc b/spacewalk/pylint/spacewalk-pylint.rc
index 914adbb..990c8e6 100644
--- a/spacewalk/pylint/spacewalk-pylint.rc
+++ b/spacewalk/pylint/spacewalk-pylint.rc
@@ -12,11 +12,18 @@ persistent=no
[MESSAGES CONTROL]
# Disable the message(s) with the given id(s).
-disable=I0011,C0111,R0801,W0142,W0403,W0603
+disable=I0011,C0302,C0111,R0801,R0902,R0904,R0912,R0913,R0914,R0915,W0142,W0403,W0603
# list of disabled messages:
#I0011: 62: Locally disabling R0201
+#C0302: 1: Too many lines in module (2425)
#C0111: 1: Missing docstring
+#R0902: 19:RequestedChannels: Too many instance attributes (9/7)
+#R0904: 26:Transport: Too many public methods (22/20)
+#R0912:171:set_slots_from_cert: Too many branches (59/20)
+#R0913:101:GETServer.__init__: Too many arguments (11/10)
+#R0914:171:set_slots_from_cert: Too many local variables (38/20)
+#R0915:171:set_slots_from_cert: Too many statements (169/50)
#W0142:228:MPM_Package.write: Used * or ** magic
#W0403: 28: Relative import 'rhnLog', should be 'backend.common.rhnLog'
#W0603: 72:initLOG: Using the global statement
11 years, 8 months
Changes to 'refs/tags/spacewalk-java-1.8.133-1'
by Tomas Lestach
Tag 'spacewalk-java-1.8.133-1' created by Tomas Lestach <tlestach(a)redhat.com> at 2012-08-23 16:29 +0000
Tagging package [spacewalk-java] version [1.8.133-1] in directory [java/].
Changes since spacewalk-java-1.8.132-1:
Tomas Lestach (2):
851040 - checkstyle issue
Automatic commit of package [spacewalk-java] release [1.8.133-1].
---
java/code/src/com/redhat/rhn/frontend/action/channel/manage/SyncRepositoriesAction.java | 5 +++--
java/spacewalk-java.spec | 5 ++++-
rel-eng/packages/spacewalk-java | 2 +-
3 files changed, 8 insertions(+), 4 deletions(-)
---
11 years, 8 months
java/spacewalk-java.spec rel-eng/packages
by Tomas Lestach
java/spacewalk-java.spec | 5 ++++-
rel-eng/packages/spacewalk-java | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 31c301f0b856e45ef2e2aa29c7f4dd7d78fd7b8c
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Aug 23 18:29:44 2012 +0200
Automatic commit of package [spacewalk-java] release [1.8.133-1].
diff --git a/java/spacewalk-java.spec b/java/spacewalk-java.spec
index f651ce4..7d958fc 100644
--- a/java/spacewalk-java.spec
+++ b/java/spacewalk-java.spec
@@ -23,7 +23,7 @@ Name: spacewalk-java
Summary: Spacewalk Java site packages
Group: Applications/Internet
License: GPLv2
-Version: 1.8.132
+Version: 1.8.133
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -614,6 +614,9 @@ fi
%{jardir}/postgresql-jdbc.jar
%changelog
+* Thu Aug 23 2012 Tomas Lestach <tlestach(a)redhat.com> 1.8.133-1
+- 851040 - checkstyle issue
+
* Thu Aug 23 2012 Tomas Lestach <tlestach(a)redhat.com> 1.8.132-1
- 851040 - detect empty quartz crop expression
- 851150 - we need only unique channel list
diff --git a/rel-eng/packages/spacewalk-java b/rel-eng/packages/spacewalk-java
index cf968f4..14eba7c 100644
--- a/rel-eng/packages/spacewalk-java
+++ b/rel-eng/packages/spacewalk-java
@@ -1 +1 @@
-1.8.132-1 java/
+1.8.133-1 java/
11 years, 8 months
java/code
by Tomas Lestach
java/code/src/com/redhat/rhn/frontend/action/channel/manage/SyncRepositoriesAction.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 45c659fc45f51c8cf464a1419851fa86e76e6291
Author: Tomas Lestach <tlestach(a)redhat.com>
Date: Thu Aug 23 18:28:33 2012 +0200
851040 - checkstyle issue
diff --git a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/SyncRepositoriesAction.java b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/SyncRepositoriesAction.java
index c8c5112..0c680ac 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/channel/manage/SyncRepositoriesAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/channel/manage/SyncRepositoriesAction.java
@@ -122,8 +122,9 @@ public class SyncRepositoriesAction extends RhnAction implements Listable {
}
else if (context.wasDispatched("schedule.button")) {
- if ((picker.isDisabled() || StringUtils.isEmpty(picker.getCronEntry())) &&
- oldCronExpr != null) {
+ if ((picker.isDisabled() ||
+ StringUtils.isEmpty(picker.getCronEntry())) &&
+ oldCronExpr != null) {
taskomatic.unscheduleRepoSync(chan, user);
createSuccessMessage(request, "message.syncschedule.disabled",
chan.getName());
11 years, 8 months