[copr] master: W:139, 12: Unnecessary pass statement (unnecessary-pass) (332f0c6)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 332f0c645ff694e3be02b438c54ef299c4be6874
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Oct 17 13:49:07 2013 +0200
W:139,12: Unnecessary pass statement (unnecessary-pass)
>---------------------------------------------------------------
backend/dispatcher.py | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/backend/dispatcher.py b/backend/dispatcher.py
index 123d065..b1ace7e 100644
--- a/backend/dispatcher.py
+++ b/backend/dispatcher.py
@@ -136,7 +136,6 @@ class Worker(multiprocessing.Process):
except Exception, e:
# XXX - Maybe log traceback as well with traceback.format_exc()
self.callback.log('failed to publish message: %s' % e)
- pass # But continue on happily.
def spawn_instance(self):
"""call the spawn playbook to startup/provision a building instance"""
10 years, 6 months
[copr] master: W:301, 16: Unnecessary pass statement (unnecessary-pass) (f405959)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit f40595933812afd9d2093df1a806697abff4beb2
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Oct 17 13:48:30 2013 +0200
W:301,16: Unnecessary pass statement (unnecessary-pass)
>---------------------------------------------------------------
backend/dispatcher.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/backend/dispatcher.py b/backend/dispatcher.py
index 1c9a3e4..123d065 100644
--- a/backend/dispatcher.py
+++ b/backend/dispatcher.py
@@ -132,6 +132,7 @@ class Worker(multiprocessing.Process):
content['what'] = what
if self.opts.fedmsg_enabled:
fedmsg.publish(modname="copr", topic=topic, msg=content)
+ # pylint: disable=W0703
except Exception, e:
# XXX - Maybe log traceback as well with traceback.format_exc()
self.callback.log('failed to publish message: %s' % e)
@@ -297,7 +298,6 @@ class Worker(multiprocessing.Process):
fedmsg.init(name="relay_inbound", cert_prefix="copr", active=True)
except Exception, e:
self.callback.log('failed to initialize fedmsg: %s' % e)
- pass # But continue on happily.
status = 1
job.started_on = time.time()
10 years, 6 months
[copr] master: W: 27, 4: __init__ method from base class PlaybookCallbacks is not called (super-init-not-called) (0595e85)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 0595e85890c5c7602417d779ba4616e70ba1ab7f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Oct 17 12:02:17 2013 +0200
W: 27, 4: __init__ method from base class PlaybookCallbacks is not called (super-init-not-called)
>---------------------------------------------------------------
backend/dispatcher.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/backend/dispatcher.py b/backend/dispatcher.py
index f565af2..1c9a3e4 100644
--- a/backend/dispatcher.py
+++ b/backend/dispatcher.py
@@ -25,7 +25,7 @@ class SilentPlaybookCallbacks(callbacks.PlaybookCallbacks):
''' playbook callbacks - quietly! '''
def __init__(self, verbose=False):
-
+ super(SilentPlaybookCallbacks, self).__init__()
self.verbose = verbose
def on_start(self):
10 years, 6 months
[copr] master: W:144, 4: __init__ method from base class Exception is not called (super-init-not-called) (05270c5)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 05270c5c2f8b2b42015b3723bca0663616482ea1
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Oct 17 12:00:57 2013 +0200
W:144, 4: __init__ method from base class Exception is not called (super-init-not-called)
>---------------------------------------------------------------
backend/mockremote.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/backend/mockremote.py b/backend/mockremote.py
index 3bdd9c4..3f5f721 100755
--- a/backend/mockremote.py
+++ b/backend/mockremote.py
@@ -142,6 +142,7 @@ def check_for_ans_error(results, hostname, err_codes=[], success_codes=[0],
class MockRemoteError(Exception):
def __init__(self, msg):
+ super(MockRemoteError, self).__init__()
self.msg = msg
def __str__(self):
10 years, 6 months
[copr] master: W: 4, 4: __init__ method from base class Exception is not called (super-init-not-called) (a46299a)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit a46299afd1098c0c443765b344154faf9e672c43
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Oct 17 11:59:47 2013 +0200
W: 4, 4: __init__ method from base class Exception is not called (super-init-not-called)
>---------------------------------------------------------------
backend/errors.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/backend/errors.py b/backend/errors.py
index fe29701..0d00db4 100644
--- a/backend/errors.py
+++ b/backend/errors.py
@@ -2,6 +2,7 @@
class CoprBackendError(Exception):
def __init__(self, msg):
+ super(CoprBackendError, self).__init__()
self.msg = msg
def __str__(self):
10 years, 6 months
[copr] master: remove trailing whitespace (b39813f)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit b39813f9a6ace35a972343991469eeb075761b58
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Oct 17 11:58:15 2013 +0200
remove trailing whitespace
>---------------------------------------------------------------
0 files changed, 0 insertions(+), 0 deletions(-)
10 years, 6 months
[copr] master: simplify code (578c75c)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 578c75ce9e7ecfeccf18eee03f74134a9c9e54de
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Oct 17 11:56:55 2013 +0200
simplify code
>---------------------------------------------------------------
copr-be.py | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/copr-be.py b/copr-be.py
index 2db9839..e1d8da3 100755
--- a/copr-be.py
+++ b/copr-be.py
@@ -285,8 +285,6 @@ def main(args):
if 'cbe' in locals():
cbe.terminate()
raise
- except KeyboardInterrupt:
- pass
if __name__ == '__main__':
try:
10 years, 6 months
[copr] master: W:283, 22: Unused variable e (unused-variable) (91532fb)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 91532fbae518faf35e200604f65c8669d334f1a4
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Oct 17 11:56:17 2013 +0200
W:283,22: Unused variable e (unused-variable)
>---------------------------------------------------------------
copr-be.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/copr-be.py b/copr-be.py
index 76e88b6..2db9839 100755
--- a/copr-be.py
+++ b/copr-be.py
@@ -280,12 +280,12 @@ def main(args):
with context:
cbe = CoprBackend(opts.config_file, ext_opts=opts)
cbe.run()
- except Exception, e:
+ except Exception:
print 'Killing/Dying'
if 'cbe' in locals():
cbe.terminate()
raise
- except KeyboardInterrupt, e:
+ except KeyboardInterrupt:
pass
if __name__ == '__main__':
10 years, 6 months
[copr] master: W:208, 24: Unused variable i (unused-variable) (bdc35f6)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit bdc35f67b490f3fe6119d0498ed8330a654ddd7a
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Oct 17 11:54:55 2013 +0200
W:208,24: Unused variable i (unused-variable)
>---------------------------------------------------------------
copr-be.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/copr-be.py b/copr-be.py
index ab96ea5..76e88b6 100755
--- a/copr-be.py
+++ b/copr-be.py
@@ -205,7 +205,7 @@ class CoprBackend(object):
# this handles starting/growing the number of workers
if len(self.workers) < self.opts.num_workers:
self.event("Spinning up more workers for jobs")
- for i in range(self.opts.num_workers - len(self.workers)):
+ for _ in range(self.opts.num_workers - len(self.workers)):
worker_num = len(self.workers) + 1
w = Worker(self.opts, self.jobs, self.events, worker_num)
self.workers.append(w)
10 years, 6 months
[copr] master: do not use exception variable (b0abe12)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit b0abe12068455c6ae260799636e082bdbf963a6f
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Oct 17 11:52:00 2013 +0200
do not use exception variable
addresing:
W:116,12: Redefining name 'e' from outer scope (line 294) (redefined-outer-name)
>---------------------------------------------------------------
copr-be.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/copr-be.py b/copr-be.py
index 70aa67b..ab96ea5 100755
--- a/copr-be.py
+++ b/copr-be.py
@@ -291,6 +291,6 @@ def main(args):
if __name__ == '__main__':
try:
main(sys.argv[1:])
- except KeyboardInterrupt, e:
+ except KeyboardInterrupt:
print "\nUser cancelled, may need cleanup\n"
sys.exit(0)
10 years, 6 months