Remove redundant semicolons in Python code

This commit is contained in:
practicalswift 2017-01-20 22:55:26 +01:00
parent 82274c02ed
commit 5cdf10611f
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"