summary refs log tree commit diff
path: root/scripts-dev/dump_macaroon.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-10-22 22:18:02 +1100
committerAmber Brown <hawkowl@atleastfornow.net>2018-10-22 22:18:02 +1100
commitead471e72df700036a3085c2403cf2307f08d2d8 (patch)
tree833f31c14824e339fe038bfd5713dfb639288be5 /scripts-dev/dump_macaroon.py
parentMerge branch 'develop' into matrix-org-hotfixes (diff)
parentuh, Matrix is called Matrix these days... (diff)
downloadsynapse-ead471e72df700036a3085c2403cf2307f08d2d8.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'scripts-dev/dump_macaroon.py')
-rwxr-xr-xscripts-dev/dump_macaroon.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts-dev/dump_macaroon.py b/scripts-dev/dump_macaroon.py

index fcc5568835..22b30fa78e 100755 --- a/scripts-dev/dump_macaroon.py +++ b/scripts-dev/dump_macaroon.py
@@ -1,8 +1,11 @@ #!/usr/bin/env python2 -import pymacaroons +from __future__ import print_function + import sys +import pymacaroons + if len(sys.argv) == 1: sys.stderr.write("usage: %s macaroon [key]\n" % (sys.argv[0],)) sys.exit(1) @@ -11,14 +14,14 @@ macaroon_string = sys.argv[1] key = sys.argv[2] if len(sys.argv) > 2 else None macaroon = pymacaroons.Macaroon.deserialize(macaroon_string) -print macaroon.inspect() +print(macaroon.inspect()) -print "" +print("") verifier = pymacaroons.Verifier() verifier.satisfy_general(lambda c: True) try: verifier.verify(macaroon, key) - print "Signature is correct" + print("Signature is correct") except Exception as e: - print str(e) + print(str(e))