pylint W0703(broad-except)

This commit is contained in:
Carlos Meza 2018-02-25 09:43:47 +00:00
parent b180f66ef0
commit 23ec568d3c
4 changed files with 4 additions and 5 deletions

View file

@ -61,7 +61,7 @@ class PrintPublicIPAddress(Task):
info._ec2['instance'] = conn.describe_instances(InstanceIds=[info._ec2['instance']['InstanceId']])['Reservations'][0]['Instances'][0] 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']) logger.info('******* EC2 IP ADDRESS: %s *******' % info._ec2['instance']['PublicIpAddress'])
f.write(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') logger.error('Could not get IP address for the instance')
f.write('') f.write('')

View file

@ -115,7 +115,7 @@ class Server(object):
try: try:
bootstrap_info = run(manifest, debug=debug, dry_run=dry_run) bootstrap_info = run(manifest, debug=debug, dry_run=dry_run)
queue.put(bootstrap_info) queue.put(bootstrap_info)
except (Exception, KeyboardInterrupt) as e: except (Exception, KeyboardInterrupt) as e: # pylint: disable=broad-except
queue.put(e) queue.put(e)
from multiprocessing import Queue from multiprocessing import Queue

View file

@ -32,7 +32,7 @@ enable=W0401,W0403,W0404,W0406,W0611,W0614
# Disable the message, report, category or checker with the given id(s). You # 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 # can either give multiple identifier separated by comma (,) or put this option
# multiple time. # 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 # W0511 fixme
# C0111 mssing-docstring # C0111 mssing-docstring
# I0011 locally-disabled # I0011 locally-disabled
@ -56,7 +56,6 @@ disable=W0511,C0111,I0011,I0020,R0201,R0801,E0632,E1121,E1601,E1608,W0102,W0106,
# W0613(unused-argument) # W0613(unused-argument)
# W0621(redefined-outer-name) # W0621(redefined-outer-name)
# W0640(cell-var-from-loop) # W0640(cell-var-from-loop)
# W0703(broad-except)
# W1201(logging-not-lazy) # W1201(logging-not-lazy)
# W1202(logging-format-interpolation) # W1202(logging-format-interpolation)
# W1401(anomalous-backslash-in-string) # W1401(anomalous-backslash-in-string)

View file

@ -23,7 +23,7 @@ class Image(object):
try: try:
self.container.stop() self.container.stop()
self.container.destroy() self.container.destroy()
except Exception as e: except Exception as e: # pylint: disable=broad-except
log.exception(e) log.exception(e)