take encryption function from globals() rather than locals()

This commit is contained in:
Lukasz Langa 2011-05-09 13:56:53 +02:00
parent 0171690af5
commit 00fb296ed7

View File

@ -65,5 +65,5 @@ def has_right(owner, user, password):
if line.strip(): if line.strip():
login, hash_value = line.strip().split(":") login, hash_value = line.strip().split(":")
if login == user and (not PERSONAL or user == owner): if login == user and (not PERSONAL or user == owner):
return locals()["_%s" % ENCRYPTION](hash_value, password) return globals()["_%s" % ENCRYPTION](hash_value, password)
return False return False