Fix 'pw' variable name in error handling
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Sat, 25 Jan 2020 17:30:58 +0000 (18:30 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Sat, 25 Jan 2020 17:30:58 +0000 (18:30 +0100)
pylint complained:
crypto.py:840:40: E0602: Undefined variable 'password' (undefined-variable)

deltatar/crypto.py

index cba2c35..9140454 100755 (executable)
@@ -837,7 +837,7 @@ def scrypt_hashsource (pw, ins):
         pw = str.encode (pw)
     elif isinstance (pw, bytes) is False:
         raise InvalidParameter ("password must be a string, not %s"
-                                % type (password))
+                                % type (pw))
     if isinstance (ins, io.BufferedReader) is False and \
             isinstance (ins, io.FileIO) is False:
         raise InvalidParameter ("file to hash must be opened in “binary” mode")