summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2024-01-16 21:51:47 +0100
committerTimotej Lazar <timotej.lazar@araneo.si>2024-01-16 21:52:15 +0100
commitf38fc807aadf14b72301cb2622c2cd62b84ed02e (patch)
treebfc100c558020d6cc06e020ff1d8929819a55ca6
parentd3d72791cf2ffecf7ee564180e6b190226d692ed (diff)
Remove unused variable
-rwxr-xr-xmargfools5
1 files changed, 3 insertions, 2 deletions
diff --git a/margfools b/margfools
index 759968e..0d4ca07 100755
--- a/margfools
+++ b/margfools
@@ -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