diff options
| author | Timotej Lazar <timotej.lazar@araneo.si> | 2024-01-16 21:51:47 +0100 |
|---|---|---|
| committer | Timotej Lazar <timotej.lazar@araneo.si> | 2024-01-16 21:52:15 +0100 |
| commit | f38fc807aadf14b72301cb2622c2cd62b84ed02e (patch) | |
| tree | bfc100c558020d6cc06e020ff1d8929819a55ca6 | |
| parent | d3d72791cf2ffecf7ee564180e6b190226d692ed (diff) | |
Remove unused variable
| -rwxr-xr-x | margfools | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -95,19 +95,20 @@ if __name__ == '__main__': request = json.loads(r.text) request['AuthenticationToken'] = token request['CertificatePublicKey'] = args.cert + # keep signing whatever they send us while True: for name in ('AttachmentHashes', 'XmlHashes'): if request.get(name) is not None: request[f'Signed{name}'] = [sign(e, args.key, pin, engine=args.engine) for e in request[name]] - d = json.dumps(request) - d = d.encode() + r = session.put(f'{url}signatures/{request["SignatureRequestId"]}', headers=headers | {'Content-Type': 'application/json; charset=utf-8'}, data=json.dumps(request).encode()) if not r.text: break request |= json.loads(r.text) + except Exception as ex: print(ex, file=sys.stderr) input('press enter to exit') # don’t close terminal immediately on fail |
