Fixed four Flake8 errors

This commit is contained in:
Troy McConaghy 2018-11-03 17:08:52 +01:00
parent e2914fec22
commit 72a1d891a0
4 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ class LocalMongoDBConnection(Connection):
try: try:
try: try:
return query.run(self.conn) return query.run(self.conn)
except pymongo.errors.AutoReconnect as exc: except pymongo.errors.AutoReconnect:
logger.warning('Lost connection to the database, ' logger.warning('Lost connection to the database, '
'retrying query.') 'retrying query.')
return query.run(self.conn) return query.run(self.conn)

View File

@ -57,7 +57,7 @@ def validate_asset_public_key(pk):
if len(pk_decoded) != 32: if len(pk_decoded) != 32:
raise InvalidPublicKey('Public key should be of size 32 bytes') raise InvalidPublicKey('Public key should be of size 32 bytes')
except binascii.Error as e: except binascii.Error:
raise InvalidPublicKey('Invalid `type` specified for public key `value`') raise InvalidPublicKey('Invalid `type` specified for public key `value`')

View File

@ -134,7 +134,7 @@ def websocket_handler(request):
except RuntimeError as e: except RuntimeError as e:
logger.debug('Websocket exception: %s', str(e)) logger.debug('Websocket exception: %s', str(e))
break break
except CancelledError as e: except CancelledError:
logger.debug('Websocket closed') logger.debug('Websocket closed')
break break
if msg.type == aiohttp.WSMsgType.CLOSED: if msg.type == aiohttp.WSMsgType.CLOSED:

View File

@ -415,7 +415,7 @@ def abci_http(_setup_database, _configure_bigchaindb, abci_server,
requests.get(uri) requests.get(uri)
return True return True
except requests.exceptions.RequestException as e: except requests.exceptions.RequestException:
pass pass
time.sleep(1) time.sleep(1)