summary refs log tree commit diff
path: root/scripts/hash_password
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-05-14 11:46:35 +0100
committerGitHub <noreply@github.com>2021-05-14 11:46:35 +0100
commit6482075c95957ad980d9c1323f9f982e6f7aaff4 (patch)
tree593a4e2e96f27d63be8265d1a20228a2271b1be4 /scripts/hash_password
parentMinor `@cachedList` enhancements (#9975) (diff)
downloadsynapse-6482075c95957ad980d9c1323f9f982e6f7aaff4.tar.xz
Run `black` on the scripts (#9981)
Turns out these scripts weren't getting linted.
Diffstat (limited to 'scripts/hash_password')
-rwxr-xr-xscripts/hash_password6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/hash_password b/scripts/hash_password
index a30767f758..1d6fb0d700 100755
--- a/scripts/hash_password
+++ b/scripts/hash_password
@@ -41,7 +41,7 @@ if __name__ == "__main__":
     parser.add_argument(
         "-c",
         "--config",
-        type=argparse.FileType('r'),
+        type=argparse.FileType("r"),
         help=(
             "Path to server config file. "
             "Used to read in bcrypt_rounds and password_pepper."
@@ -72,8 +72,8 @@ if __name__ == "__main__":
     pw = unicodedata.normalize("NFKC", password)
 
     hashed = bcrypt.hashpw(
-        pw.encode('utf8') + password_pepper.encode("utf8"),
+        pw.encode("utf8") + password_pepper.encode("utf8"),
         bcrypt.gensalt(bcrypt_rounds),
-    ).decode('ascii')
+    ).decode("ascii")
 
     print(hashed)