Fix 'pw' variable name in error handling
[python-delta-tar] / 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")