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-20 11:16:55 +1100
committerGitHub <noreply@github.com>2018-10-20 11:16:55 +1100
commite1728dfcbe585edfb590bce50adeaab341a70db8 (patch)
tree0ae215c46f15ecc917bf45d75430298a003b0e27 /scripts-dev/dump_macaroon.py
parentMerge branch 'rav/fix_email_templates_4065' into develop (diff)
downloadsynapse-e1728dfcbe585edfb590bce50adeaab341a70db8.tar.xz
Make scripts/ and scripts-dev/ pass pyflakes (and the rest of the codebase on py3) (#4068)
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))