You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for wanting to report an issue you've found in redis-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!
This script is similar to ACL GENPASS [bits], we will get an 8-digit password. But what we got didn't meet expectations.
Your source code might get the desired result this way:
defacl_genpass(self, bits: Union[int, None] =None, **kwargs) ->ResponseT:
"""Generate a random password value. If ``bits`` is supplied then use this number of bits, rounded to the next multiple of 4. See: https://redis.io/commands/acl-genpass """pieces= []
ifbitsisnotNone:
try:
b=int(bits)
ifb<0orb>4096:
raiseValueErrorpieces.append(b)
exceptValueError:
raiseDataError(
"genpass optionally accepts a bits argument, between 0 and 4096."
)
returnself.execute_command("ACL GENPASS", *pieces, **kwargs)
The text was updated successfully, but these errors were encountered:
Thanks for wanting to report an issue you've found in redis-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!
Version: 5.0.1, "bug" about acl_genpass method
Platform: win11
Description: Refer to the following demo
demo:
This script is similar to
ACL GENPASS [bits]
, we will get an 8-digit password. But what we got didn't meet expectations.Your source code might get the desired result this way:
The text was updated successfully, but these errors were encountered: