Add else statement to document check

This commit is contained in:
poka 2020-11-15 03:56:18 +01:00
parent 516ee8e69f
commit a3b1049ecc
1 changed files with 3 additions and 3 deletions

6
pay.py
View File

@ -56,7 +56,6 @@ except Exception as e:
# Check document
# print(txDoc) # For debug
docList = txDoc.splitlines()
for i, line in enumerate(docList):
if re.search("Issuers:", line):
@ -72,9 +71,10 @@ if issuerRaw != issuer or int(outAmount) != amount or outPubkey != recipient or
sys.stderr.write(colored("Le document généré est corrompu !\nNe fait plus confiance au noeud " + node + "\n", 'red'))
sys.stderr.write(colored(issuerRaw + " envoi " + outAmount + " vers " + outPubkey + " with comment: " + commentRaw + "\n", "yellow"))
sys.exit(1)
else:
print("Le document généré est conforme.")
print("Le document généré est conforme.")
# sys.exit(0)
# sys.exit(0) # For debug
# Sign TX document
signature = fmt["64"](sign(txDoc.encode(), get_privkey(dunikey, "pubsec"))[:-len(txDoc.encode())])