Traceback (most recent call last):
File "rpcauth.py", line 47, in
main()
File "rpcauth.py", line 40, in main
password_hmac = password_to_hmac(salt, password)
File "rpcauth.py", line 25, in password_to_hmac
m = hmac.new(bytearray(salt, 'utf-8'), bytearray(password, 'utf-8'), 'SHA256')
File "/usr/lib/python2.7/hmac.py", line 136, in new
return HMAC(key, msg, digestmod)
File "/usr/lib/python2.7/hmac.py", line 52, in __init__
self.outer = self.digest_cons()
File "/usr/lib/python2.7/hmac.py", line 50, in
self.digest_cons = lambda d='': digestmod.new(d)
AttributeError: 'str' object has no attribute 'new'