Merge #9607: Remove redundant semicolons in Python code

5cdf106 Remove redundant semicolons in Python code (practicalswift)
This commit is contained in:
Wladimir J. van der Laan 2017-01-23 13:22:32 +01:00
commit 5cf3c60fcc
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
8 changed files with 16 additions and 16 deletions

View File

@ -128,7 +128,7 @@ def main():
line_count = int(match.group(3))
if line_count == 0:
continue
end_line = start_line + line_count - 1;
end_line = start_line + line_count - 1
lines_by_file.setdefault(filename, []).extend(
['-lines', str(start_line) + ':' + str(end_line)])
@ -147,7 +147,7 @@ def main():
stderr=None, stdin=subprocess.PIPE)
stdout, stderr = p.communicate()
if p.returncode != 0:
sys.exit(p.returncode);
sys.exit(p.returncode)
if not args.i:
with open(filename) as f:

View File

@ -39,7 +39,7 @@ for folder in folders:
if extension.lower() == '.png':
print("optimizing "+file+"..."),
file_path = os.path.join(absFolder, file)
fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)};
fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)}
fileMetaMap['contentHashPre'] = content_hash(file_path)
pngCrushOutput = ""

View File

@ -22,7 +22,7 @@ try:
msg = zmqSubSocket.recv_multipart()
topic = str(msg[0])
body = msg[1]
sequence = "Unknown";
sequence = "Unknown"
if len(msg[-1]) == 4:
msgSequence = struct.unpack('<I', msg[-1])[-1]
sequence = str(msgSequence)

View File

@ -226,7 +226,7 @@ class RawTransactionsTest(BitcoinTestFramework):
assert(False)
rawtxfund = self.nodes[2].fundrawtransaction(rawtx, {'changeAddress': change, 'changePosition': 0})
dec_tx = self.nodes[2].decoderawtransaction(rawtxfund['hex'])
out = dec_tx['vout'][0];
out = dec_tx['vout'][0]
assert_equal(change, out['scriptPubKey']['addresses'][0])

View File

@ -108,7 +108,7 @@ class ImportMultiTest (BitcoinTestFramework):
"scriptPubKey": address['scriptPubKey'],
"pubkeys": [ address['pubkey'] ],
"internal": True
}];
}]
result = self.nodes[1].importmulti(request)
assert_equal(result[0]['success'], True)
address_assert = self.nodes[1].validateaddress(address['address'])
@ -121,7 +121,7 @@ class ImportMultiTest (BitcoinTestFramework):
request = [{
"scriptPubKey": address['scriptPubKey'],
"pubkeys": [ address['pubkey'] ]
}];
}]
result = self.nodes[1].importmulti(request)
assert_equal(result[0]['success'], False)
assert_equal(result[0]['error']['code'], -8)
@ -197,7 +197,7 @@ class ImportMultiTest (BitcoinTestFramework):
self.nodes[1].generate(100)
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00)
self.nodes[1].generate(1)
transaction = self.nodes[1].gettransaction(transactionid);
transaction = self.nodes[1].gettransaction(transactionid)
print("Should import a p2sh")
result = self.nodes[1].importmulti([{
@ -222,7 +222,7 @@ class ImportMultiTest (BitcoinTestFramework):
self.nodes[1].generate(100)
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00)
self.nodes[1].generate(1)
transaction = self.nodes[1].gettransaction(transactionid);
transaction = self.nodes[1].gettransaction(transactionid)
print("Should import a p2sh with respective redeem script")
result = self.nodes[1].importmulti([{
@ -246,7 +246,7 @@ class ImportMultiTest (BitcoinTestFramework):
self.nodes[1].generate(100)
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00)
self.nodes[1].generate(1)
transaction = self.nodes[1].gettransaction(transactionid);
transaction = self.nodes[1].gettransaction(transactionid)
print("Should import a p2sh with respective redeem script and private keys")
result = self.nodes[1].importmulti([{
@ -270,7 +270,7 @@ class ImportMultiTest (BitcoinTestFramework):
self.nodes[1].generate(100)
transactionid = self.nodes[1].sendtoaddress(multi_sig_script['address'], 10.00)
self.nodes[1].generate(1)
transaction = self.nodes[1].gettransaction(transactionid);
transaction = self.nodes[1].gettransaction(transactionid)
print("Should import a p2sh with respective redeem script and private keys")
result = self.nodes[1].importmulti([{
@ -312,7 +312,7 @@ class ImportMultiTest (BitcoinTestFramework):
"scriptPubKey": address['scriptPubKey'],
"pubkeys": [ address2['pubkey'] ],
"internal": True
}];
}]
result = self.nodes[1].importmulti(request)
assert_equal(result[0]['success'], False)
assert_equal(result[0]['error']['code'], -5)

View File

@ -21,9 +21,9 @@ def allInvsMatch(invsExpected, testnode):
for x in range(60):
with mininode_lock:
if (sorted(invsExpected) == sorted(testnode.txinvs)):
return True;
return True
time.sleep(1)
return False;
return False
# TestNode: bare-bones "peer". Used to track which invs are received from a node
# and to send the node feefilter messages.

View File

@ -1662,7 +1662,7 @@ class SegWitTest(BitcoinTestFramework):
# too many sigops (contributing to legacy sigop count).
checksig_count = (extra_sigops_available // 4) + 1
scriptPubKey_checksigs = CScript([OP_CHECKSIG]*checksig_count)
tx2.vout.append(CTxOut(0, scriptPubKey_checksigs));
tx2.vout.append(CTxOut(0, scriptPubKey_checksigs))
tx2.vin.pop()
tx2.wit.vtxinwit.pop()
tx2.vout[0].nValue -= tx.vout[-2].nValue

View File

@ -39,7 +39,7 @@ def addlength(script):
return scriptlen + script
def create_witnessprogram(version, node, utxo, pubkey, encode_p2sh, amount):
pkscript = witness_script(version, pubkey);
pkscript = witness_script(version, pubkey)
if (encode_p2sh):
p2sh_hash = bytes_to_hex_str(ripemd160(sha256(hex_str_to_bytes(pkscript))))
pkscript = "a914"+p2sh_hash+"87"