From 23ec568d3c51d87903ed25ebb592bdc08ae9eb27 Mon Sep 17 00:00:00 2001 From: Carlos Meza Date: Sun, 25 Feb 2018 09:43:47 +0000 Subject: [PATCH] pylint W0703(broad-except) --- bootstrapvz/plugins/ec2_launch/tasks.py | 2 +- bootstrapvz/remote/server.py | 2 +- pylintrc | 3 +-- tests/system/providers/docker/image.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bootstrapvz/plugins/ec2_launch/tasks.py b/bootstrapvz/plugins/ec2_launch/tasks.py index f7134e0..e86d899 100644 --- a/bootstrapvz/plugins/ec2_launch/tasks.py +++ b/bootstrapvz/plugins/ec2_launch/tasks.py @@ -61,7 +61,7 @@ class PrintPublicIPAddress(Task): info._ec2['instance'] = conn.describe_instances(InstanceIds=[info._ec2['instance']['InstanceId']])['Reservations'][0]['Instances'][0] logger.info('******* EC2 IP ADDRESS: %s *******' % info._ec2['instance']['PublicIpAddress']) f.write(info._ec2['instance']['PublicIpAddress']) - except Exception: + except Exception: # pylint: disable=broad-except logger.error('Could not get IP address for the instance') f.write('') diff --git a/bootstrapvz/remote/server.py b/bootstrapvz/remote/server.py index f0db204..584631f 100644 --- a/bootstrapvz/remote/server.py +++ b/bootstrapvz/remote/server.py @@ -115,7 +115,7 @@ class Server(object): try: bootstrap_info = run(manifest, debug=debug, dry_run=dry_run) queue.put(bootstrap_info) - except (Exception, KeyboardInterrupt) as e: + except (Exception, KeyboardInterrupt) as e: # pylint: disable=broad-except queue.put(e) from multiprocessing import Queue diff --git a/pylintrc b/pylintrc index 403f987..96a711d 100644 --- a/pylintrc +++ b/pylintrc @@ -32,7 +32,7 @@ enable=W0401,W0403,W0404,W0406,W0611,W0614 # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifier separated by comma (,) or put this option # multiple time. -disable=W0511,C0111,I0011,I0020,R0201,R0801,E0632,E1121,E1601,E1608,W0102,W0106,W0108,W0110,W0201,W0212,W0311,W0402,W0612,W0613,W0621,W0640,W0703,W1201,W1202,W1401,C0103,C0301,C0325,C0326,C0330,C0411,R0401,R0914,R1710 +disable=W0511,C0111,I0011,I0020,R0201,R0801,E0632,E1121,E1601,E1608,W0102,W0106,W0108,W0110,W0201,W0212,W0311,W0402,W0612,W0613,W0621,W0640,W1201,W1202,W1401,C0103,C0301,C0325,C0326,C0330,C0411,R0401,R0914,R1710 # W0511 fixme # C0111 mssing-docstring # I0011 locally-disabled @@ -56,7 +56,6 @@ disable=W0511,C0111,I0011,I0020,R0201,R0801,E0632,E1121,E1601,E1608,W0102,W0106, # W0613(unused-argument) # W0621(redefined-outer-name) # W0640(cell-var-from-loop) -# W0703(broad-except) # W1201(logging-not-lazy) # W1202(logging-format-interpolation) # W1401(anomalous-backslash-in-string) diff --git a/tests/system/providers/docker/image.py b/tests/system/providers/docker/image.py index af4f1f8..0d377fa 100644 --- a/tests/system/providers/docker/image.py +++ b/tests/system/providers/docker/image.py @@ -23,7 +23,7 @@ class Image(object): try: self.container.stop() self.container.destroy() - except Exception as e: + except Exception as e: # pylint: disable=broad-except log.exception(e)