diff --git a/.arclint b/.arclint --- a/.arclint +++ b/.arclint @@ -26,7 +26,7 @@ "include": "(\\.py$)", "flags": [ "--select=E,W,F", - "--ignore=E501,E704,E722,W503,W504" + "--ignore=E501,E704,W503,W504" ] }, "lint-format-strings": { diff --git a/contrib/devtools/optimize-pngs.py b/contrib/devtools/optimize-pngs.py --- a/contrib/devtools/optimize-pngs.py +++ b/contrib/devtools/optimize-pngs.py @@ -51,7 +51,7 @@ try: subprocess.call([pngcrush, "-brute", "-ow", "-rem", "gAMA", "-rem", "cHRM", "-rem", "iCCP", "-rem", "sRGB", "-rem", "alla", "-rem", "text", file_path], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - except: + except OSError: print("pngcrush is not installed, aborting...") sys.exit(0) diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py --- a/contrib/seeds/makeseeds.py +++ b/contrib/seeds/makeseeds.py @@ -166,7 +166,7 @@ continue asn_count[asn] += 1 result.append(ip) - except: + except Exception: sys.stderr.write( 'ERR: Could not resolve ASN for "' + ip['ip'] + '"\n') diff --git a/test/functional/feature_dbcrash.py b/test/functional/feature_dbcrash.py --- a/test/functional/feature_dbcrash.py +++ b/test/functional/feature_dbcrash.py @@ -96,7 +96,7 @@ utxo_hash = self.nodes[node_index].gettxoutsetinfo()[ 'hash_serialized'] return utxo_hash - except: + except Exception: # An exception here should mean the node is about to crash. # If bitcoind exits, then try again. wait_for_node_exit() # should raise an exception if bitcoind doesn't exit. diff --git a/test/functional/p2p_node_network_limited.py b/test/functional/p2p_node_network_limited.py --- a/test/functional/p2p_node_network_limited.py +++ b/test/functional/p2p_node_network_limited.py @@ -117,7 +117,7 @@ connect_nodes_bi(self.nodes[0], self.nodes[2]) try: sync_blocks([self.nodes[0], self.nodes[2]], timeout=5) - except: + except Exception: pass # node2 must remain at heigh 0 assert_equal(self.nodes[2].getblockheader( diff --git a/test/functional/rpc_preciousblock.py b/test/functional/rpc_preciousblock.py --- a/test/functional/rpc_preciousblock.py +++ b/test/functional/rpc_preciousblock.py @@ -19,7 +19,7 @@ try: assert len(node_dest.getblock(blockhash, False)) > 0 break - except: + except Exception: blocks_to_copy.append(blockhash) blockhash = node_src.getblockheader( blockhash, True)['previousblockhash'] diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -852,7 +852,7 @@ # Relay field is optional for version 70001 onwards try: self.nRelay = struct.unpack("